27#ifndef __stir_ProjDataInfo_H__
28#define __stir_ProjDataInfo_H__
42template <
typename elemT>
44template <
typename elemT>
46template <
typename elemT>
48template <
typename elemT>
49class SegmentBySinogram;
50template <
typename elemT>
51class RelatedViewgrams;
52class DataSymmetriesForViewSegmentNumbers;
53class ViewSegmentNumbers;
58class LORInAxialAndNoArcCorrSinogramCoordinates;
89 const int num_tangential_poss,
90 const bool arc_corrected =
true,
91 const int tof_mash_factor = 0);
100 const int num_tangential_poss,
101 const bool arc_corrected =
true,
102 const int tof_mash_factor = 0);
118 const int num_tangential_poss,
119 const bool arc_corrected =
true,
120 const int tof_mash_factor = 0);
136 const int num_tangential_poss);
142 const int num_tangential_poss,
143 const int tof_mash_factor);
170 virtual void reduce_segment_range(
const int min_segment_num,
const int max_segment_num);
174 virtual void set_num_views(
const int num_views);
178 virtual void set_num_tangential_poss(
const int num_tang_poss);
187 virtual void set_num_axial_poss_per_segment(
const VectorWithOffset<int>& num_axial_poss_per_segment);
191 virtual void set_min_axial_pos_num(
const int min_ax_pos_num,
const int segment_num);
194 virtual void set_max_axial_pos_num(
const int max_ax_pos_num,
const int segment_num);
198 virtual void set_min_tangential_pos_num(
const int min_tang_poss);
201 virtual void set_max_tangential_pos_num(
const int max_tang_poss);
207 virtual void set_tof_mash_factor(
const int new_num);
213 inline int get_num_segments()
const;
215 inline int get_num_axial_poss(
const int segment_num)
const;
217 inline int get_num_views()
const;
219 inline int get_num_tangential_poss()
const;
221 inline int get_tof_bin(
const double delta)
const;
225 inline int get_unmashed_tof_bin(
const double delta)
const;
228 inline int get_num_tof_poss()
const;
230 inline int get_min_segment_num()
const;
232 inline int get_max_segment_num()
const;
234 inline int get_min_axial_pos_num(
const int segment_num)
const;
236 inline int get_max_axial_pos_num(
const int segment_num)
const;
238 inline int get_min_view_num()
const;
240 inline int get_max_view_num()
const;
242 inline int get_min_tangential_pos_num()
const;
244 inline int get_max_tangential_pos_num()
const;
248 inline int get_tof_mash_factor()
const;
250 inline int get_min_tof_pos_num()
const;
252 inline int get_max_tof_pos_num()
const;
258 inline int get_num_sinograms()
const;
263 inline int get_num_non_tof_sinograms()
const;
265 inline std::size_t size_all()
const;
269 inline bool is_tof_data()
const;
278 virtual std::vector<int> get_original_view_nums()
const;
312 virtual inline float get_m(
const Bin&)
const;
411 const int segment_num,
412 const bool make_num_tangential_poss_odd =
false,
413 const int timing_pos_num = 0)
const;
418 const int segment_num,
419 const bool make_num_tangential_poss_odd =
false,
420 const int timing_pos_num = 0)
const;
425 const bool make_num_tangential_poss_odd =
false,
426 const int timing_pos_num = 0)
const;
430 const bool make_num_tangential_poss_odd =
false,
431 const int timing_pos_num = 0)
const;
437 const shared_ptr<DataSymmetriesForViewSegmentNumbers>&,
438 const bool make_num_tangential_poss_odd =
false,
439 const int timing_pos_num = 0)
const;
473 bed_position_horizontal = bed_position_horizontal_arg;
479 return bed_position_horizontal;
485 bed_position_vertical = bed_position_vertical_arg;
491 return bed_position_vertical;
494 inline bool has_energy_information()
const
496 return scanner_ptr->has_energy_information();
500 virtual bool blindly_equals(
const root_type*
const)
const = 0;
503 shared_ptr<Scanner> scanner_ptr;
506 int min_tangential_pos_num;
507 int max_tangential_pos_num;
514 int min_unmashed_tof_pos_num;
516 int max_unmashed_tof_pos_num;
521 float tof_increament_in_mm;
524 VectorWithOffset<int> min_axial_pos_per_seg;
525 VectorWithOffset<int> max_axial_pos_per_seg;
526 float bed_position_horizontal;
527 float bed_position_vertical;
Implementations of inline functions for class stir::ProjDataInfo.
Declaration of class stir::Scanner.
Definition of class stir::SegmentIndices.
Definition of class stir::SinogramIndices.
defines the stir::VectorWithOffset class
Definition of class stir::ViewgramIndices.
A class for storing coordinates and value of a single projection bin.
Definition Bin.h:49
A class for LORs.
Definition LORCoordinates.h:511
A base class for specifying an LOR with geometric coordinates.
Definition LORCoordinates.h:59
virtual std::string parameter_info() const
Return a string describing the object.
Definition ProjDataInfo.cxx:314
float get_bed_position_horizontal() const
Get horizontal bed position.
Definition ProjDataInfo.h:477
void set_bed_position_horizontal(const float bed_position_horizontal_arg)
Vector which holds the lower and higher boundary for each TOF position, without the application of TO...
Definition ProjDataInfo.h:471
static unique_ptr< ProjDataInfo > construct_proj_data_info(const shared_ptr< Scanner > &scanner_sptr, const int span, const int max_delta, const int num_views, const int num_tangential_poss, const bool arc_corrected=true, const int tof_mash_factor=0)
Construct a ProjDataInfo suitable with a given span.
Definition ProjDataInfo.cxx:606
shared_ptr< ProjDataInfo > create_non_tof_clone() const
Similar to create_shared_clone() but returns a non-tof version of ProjDataInfo setting tof mashing fa...
Definition ProjDataInfo.inl:39
shared_ptr< ProjDataInfo > create_shared_clone() const
Like clone() but return a shared_ptr.
Definition ProjDataInfo.inl:32
float get_k(const Bin &) const
Get value of the TOF location along the LOR (in mm) k is a line segment connecting the centers of the...
Definition ProjDataInfo.cxx:69
virtual float get_sampling_in_s(const Bin &) const
Get sampling distance in the s coordinate.
Definition ProjDataInfo.cxx:109
virtual Bin get_bin(const LOR< float > &, const double delta_time=0.0) const =0
Find the bin in the projection data that 'contains' an LOR.
virtual bool operator>=(const ProjDataInfo &proj) const
Check if *this contains proj.
Definition ProjDataInfo.cxx:756
float get_bed_position_vertical() const
Get vertical bed position.
Definition ProjDataInfo.h:489
virtual float get_sampling_in_t(const Bin &) const
Get sampling distance in the t coordinate.
Definition ProjDataInfo.cxx:93
static ProjDataInfo * ProjDataInfoCTI(const shared_ptr< Scanner > &scanner_ptr, const int span, const int max_delta, const int num_views, const int num_tangential_poss, const bool arc_corrected=true, const int tof_mash_factor=0)
Old name for construct_proj_data_info()
Definition ProjDataInfo.cxx:489
virtual float get_sampling_in_m(const Bin &) const
Get sampling distance in the m coordinate.
Definition ProjDataInfo.cxx:101
virtual void get_LOR(LORInAxialAndNoArcCorrSinogramCoordinates< float > &, const Bin &) const =0
Get LOR corresponding to a given bin.
shared_ptr< Scanner > get_scanner_sptr() const
Get scanner shared pointer.
Definition ProjDataInfo.inl:218
VectorWithOffset< Float1Float2 > tof_bin_boundaries_mm
Vector which holds the lower and higher boundary for each TOF position in mm, for faster access.
Definition ProjDataInfo.h:459
float get_sampling_in_k(const Bin &) const
Get sampling distance in the k coordinate.
Definition ProjDataInfo.cxx:84
Sinogram< float > get_empty_sinogram(const SinogramIndices &) const
Get empty_sinogram.
Definition ProjDataInfo.cxx:397
float get_costheta(const Bin &) const
Get cosine of the co-polar angle of the normal to the projection plane.
Definition ProjDataInfo.inl:200
virtual float get_t(const Bin &) const =0
Get value of the (roughly) axial coordinate in the projection plane (in mm)
Viewgram< float > get_empty_viewgram(const ViewgramIndices &) const
Get empty viewgram.
Definition ProjDataInfo.cxx:371
virtual float get_m(const Bin &) const
Return z-coordinate of the middle of the LOR (in mm)
Definition ProjDataInfo.inl:206
VectorWithOffset< Float1Float2 > tof_bin_boundaries_ps
Vector which holds the lower and higher boundary for each TOF position in ps`, for faster access.
Definition ProjDataInfo.h:461
ProjDataInfo()
Construct an empty object.
Definition ProjDataInfo.cxx:274
static ProjDataInfo * ask_parameters()
Ask for the details and return a ProjDataInfo pointer.
Definition ProjDataInfo.cxx:680
virtual ProjDataInfo * clone() const =0
Standard trick for a 'virtual copy-constructor'.
virtual float get_tantheta(const Bin &) const =0
Get tangent of the co-polar angle of the normal to the projection plane.
static ProjDataInfo * ProjDataInfoGE(const shared_ptr< Scanner > &scanner_ptr, const int max_delta, const int num_views, const int num_tangential_poss, const bool arc_corrected=true, const int tof_mash_factor=0)
Construct a ProjDataInfo with span=3 for segment 0, but span=1 for others.
Definition ProjDataInfo.cxx:622
double get_tof_delta_time(const Bin &) const
Get the value of the TOF timing difference (in ps)
Definition ProjDataInfo.cxx:78
SegmentBySinogram< float > get_empty_segment_by_sinogram(const SegmentIndices &) const
Get empty segment view.
Definition ProjDataInfo.cxx:425
const Scanner * get_scanner_ptr() const
Get scanner pointer.
Definition ProjDataInfo.inl:212
RelatedViewgrams< float > get_empty_related_viewgrams(const ViewgramIndices &, const shared_ptr< DataSymmetriesForViewSegmentNumbers > &, const bool make_num_tangential_poss_odd=false, const int timing_pos_num=0) const
Get empty related viewgrams, where the symmetries_ptr specifies the symmetries to use.
Definition ProjDataInfo.cxx:462
virtual float get_s(const Bin &) const =0
Get value of the tangential coordinate in the projection plane (in mm)
virtual ~ProjDataInfo()
Destructor.
Definition ProjDataInfo.h:155
void set_bed_position_vertical(const float bed_position_vertical_arg)
Set vertical bed position.
Definition ProjDataInfo.h:483
bool operator==(const ProjDataInfo &proj) const
check equality
Definition ProjDataInfo.cxx:737
virtual float get_phi(const Bin &) const =0
Get azimuthal angle phi of the normal to the projection plane.
SegmentByView< float > get_empty_segment_by_view(const SegmentIndices &) const
Get empty segment sino.
Definition ProjDataInfo.cxx:453
A class for storing some info on the scanner.
Definition Scanner.h:108
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 very simple class to store segment numbers and any other indices that define a segment.
Definition SegmentIndices.h:34
A very simple class to store all dincies to get a (2D) Sinogram.
Definition SinogramIndices.h:34
A class for 2d projection data.
Definition Sinogram.h:47
A templated class for vectors, but with indices starting not from 0.
Definition VectorWithOffset.h:65
A very simple class to store all dincies to get a (2D) Viewgram.
Definition ViewgramIndices.h:33
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...
Struct which holds two floating numbers.
Definition ProjDataInfo.h:453
Import of std::unique_ptr into the stir namespace, together with work-arounds for other compilers.