29#ifndef __ProjDataFromStream_H__
30#define __ProjDataFromStream_H__
61 Segment_AxialPos_View_TangPos,
62 Timing_Segment_AxialPos_View_TangPos,
63 Segment_View_AxialPos_TangPos,
64 Timing_Segment_View_AxialPos_TangPos,
84 shared_ptr<const ProjDataInfo>
const& proj_data_info_ptr,
85 shared_ptr<std::iostream>
const& s,
86 const std::streamoff offs,
87 const std::vector<int>& segment_sequence_in_stream,
88 StorageOrder o = Segment_View_AxialPos_TangPos,
91 float scale_factor = 1.f);
98 shared_ptr<const ProjDataInfo>
const& proj_data_info_ptr,
99 shared_ptr<std::iostream>
const& s,
100 const std::streamoff offs = 0,
101 StorageOrder o = Segment_View_AxialPos_TangPos,
104 float scale_factor = 1.f);
128 const int segment_num,
129 const bool make_num_tangential_poss_odd =
false,
130 const int timing_pos = 0)
const override;
135 const int segment_num,
136 const bool make_num_tangential_poss_odd =
false,
137 const int timing_pos = 0)
const override;
171 std::streamoff offset;
173 std::streamoff offset_3d_data;
176 std::vector<int> segment_sequence;
178 std::vector<int> timing_poss_sequence;
180 inline int find_segment_index_in_sequence(
const int segment_num)
const;
182 StorageOrder storage_order;
193#if __cplusplus > 199711L
Declaration of class stir::Bin.
This file declares the stir::ByteOrder class.
This file declares the stir::NumericType class.
Inline implementations for class stir::ProjDataFromStream.
Declaration of class stir::ProjData.
A class for storing coordinates and value of a single projection bin.
Definition Bin.h:49
This class provides member functions to find out what byte-order your machine is and to swap numbers.
Definition ByteOrder.h:100
@ native
Definition ByteOrder.h:107
provides names for some numeric types and methods for finding their properties.
Definition NumericType.h:55
Succeeded set_sinogram(const Sinogram< float > &s) override
Set sinogram.
Definition ProjDataFromStream.cxx:572
shared_ptr< std::iostream > sino_stream
the stream with the data
Definition ProjDataFromStream.h:162
NumericType get_data_type_in_stream() const
Get the data_type in the stream.
Definition ProjDataFromStream.inl:53
Succeeded set_segment(const SegmentBySinogram< float > &) override
Set all sinograms for the given segment.
Definition ProjDataFromStream.cxx:759
SegmentBySinogram< float > get_segment_by_sinogram(const int segment_num, const int timing_num=0) const override
Get all sinograms for the given segment.
Definition ProjDataFromStream.cxx:661
Viewgram< float > get_viewgram(const int view_num, const int segment_num, const bool make_num_tangential_poss_odd=false, const int timing_pos=0) const override
Get & set viewgram.
Definition ProjDataFromStream.cxx:179
std::vector< int > get_segment_sequence_in_stream() const
Get the segment sequence.
Definition ProjDataFromStream.inl:65
ByteOrder get_byte_order_in_stream() const
Get the byte order.
Definition ProjDataFromStream.inl:59
void set_timing_poss_sequence_in_stream(const std::vector< int > &seq)
set the timing bins sequence
Definition ProjDataFromStream.cxx:152
ProjDataFromStream(shared_ptr< const ExamInfo > const &exam_info_sptr, shared_ptr< const ProjDataInfo > const &proj_data_info_ptr, shared_ptr< std::iostream > const &s, const std::streamoff offs, const std::vector< int > &segment_sequence_in_stream, StorageOrder o=Segment_View_AxialPos_TangPos, NumericType data_type=NumericType::FLOAT, ByteOrder byte_order=ByteOrder::native, float scale_factor=1.f)
constructor taking all necessary parameters
virtual float get_bin_value(const Bin &this_bin) const
Get the value of bin.
Definition ProjDataFromStream.cxx:258
std::streamoff get_offset(const Bin &) const
Calculate the offset for a specific bin.
Definition ProjDataFromStream.cxx:414
ProjDataFromStream(shared_ptr< const ExamInfo > const &exam_info_sptr, shared_ptr< const ProjDataInfo > const &proj_data_info_ptr, shared_ptr< std::iostream > const &s, const std::streamoff offs=0, StorageOrder o=Segment_View_AxialPos_TangPos, NumericType data_type=NumericType::FLOAT, ByteOrder byte_order=ByteOrder::native, float scale_factor=1.f)
as above, but with a default value for segment_sequence_in_stream
Sinogram< float > get_sinogram(const int ax_pos_num, const int segment_num, const bool make_num_tangential_poss_odd=false, const int timing_pos=0) const override
Get & set sinogram.
Definition ProjDataFromStream.cxx:501
float get_scale_factor() const
Get scale factor.
Definition ProjDataFromStream.cxx:1062
std::vector< int > get_timing_poss_sequence_in_stream() const
Get the timing bins sequence.
Definition ProjDataFromStream.inl:71
SegmentByView< float > get_segment_by_view(const int segment_num, const int timing_pos=0) const override
Get all viewgrams for the given segment.
Definition ProjDataFromStream.cxx:711
StorageOrder get_storage_order() const
Obtain the storage order.
Definition ProjDataFromStream.inl:32
virtual void set_bin_value(const Bin &bin)
Set the value of the bin.
Definition ProjDataFromStream.cxx:285
std::streamoff get_offset_in_stream() const
Get the offset -Changed into streamoff from int.
Definition ProjDataFromStream.inl:47
Succeeded set_viewgram(const Viewgram< float > &v) override
Set viewgram.
Definition ProjDataFromStream.cxx:309
ProjData()
Empty constructor.
Definition ProjData.cxx:394
A class for storing (3d) projection data with fixed SegmentIndices.
Definition SegmentBySinogram.h:51
A class for storing (3d) projection data with fixed SegmentIndices.
Definition SegmentByView.h:52
A class for 2d projection data.
Definition Sinogram.h:47
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44
A class for 2d projection data.
Definition Viewgram.h:49
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...