31shared_ptr<ProjDataInfo>
34 shared_ptr<ProjDataInfo> sptr(this->
clone());
38shared_ptr<ProjDataInfo>
41 shared_ptr<ProjDataInfo> sptr(this->
clone());
42 sptr->set_tof_mash_factor(0);
49 return (max_axial_pos_per_seg.get_length());
55 return max_axial_pos_per_seg[segment_num] - min_axial_pos_per_seg[segment_num] + 1;
61 return max_view_num - min_view_num + 1;
67 return max_tangential_pos_num - min_tangential_pos_num + 1;
82 for (
int i = min_tof_pos_num; i <= max_tof_pos_num; ++i)
88 warning(
"TOF delta time " + std::to_string(delta) +
" out of range");
89 return min_tof_pos_num;
95ProjDataInfo::get_unmashed_tof_bin(
const double delta)
const
100 for (
int i = min_unmashed_tof_pos_num; i <= max_unmashed_tof_pos_num; ++i)
102 if (delta >= tof_bin_boundaries_ps[i].low_lim &&
103 delta < tof_bin_boundaries_ps[i].high_lim)
107 warning(format(
"TOF delta time {} out of range", delta));
108 return min_tof_pos_num;
116 return tof_mash_factor;
122 return (max_axial_pos_per_seg.get_min_index());
128 return (max_axial_pos_per_seg.get_max_index());
134 return min_axial_pos_per_seg[segment_num];
140 return max_axial_pos_per_seg[segment_num];
158 return min_tangential_pos_num;
164 return max_tangential_pos_num;
170 return min_tof_pos_num;
176 return max_tof_pos_num;
183 if (tof_mash_factor == 0)
185 if (num_tof_bins != 1)
187 error(
"Non-TOF data with inconsistent Time-of-Flight bin number - Aborted operation.");
192 else if (tof_mash_factor > 0)
214 return scanner_ptr.get();
A class for storing coordinates and value of a single projection bin.
Definition Bin.h:49
int get_min_tof_pos_num() const
Get the index of the first TOF position.
Definition ProjDataInfo.inl:168
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
int get_num_sinograms() const
Get the total number of sinograms.
Definition ProjDataInfo.inl:234
shared_ptr< ProjDataInfo > create_shared_clone() const
Like clone() but return a shared_ptr.
Definition ProjDataInfo.inl:32
int get_num_axial_poss(const int segment_num) const
Get number of axial positions per segment.
Definition ProjDataInfo.inl:53
int get_min_axial_pos_num(const int segment_num) const
Get minimum axial position per segmnet.
Definition ProjDataInfo.inl:132
int get_min_tangential_pos_num() const
Get minimum tangential position number.
Definition ProjDataInfo.inl:156
int get_num_views() const
Get number of views.
Definition ProjDataInfo.inl:59
int get_tof_bin(const double delta) const
Get number of tof bin for a given time difference.
Definition ProjDataInfo.inl:77
int get_num_segments() const
Get number of segments.
Definition ProjDataInfo.inl:47
shared_ptr< Scanner > get_scanner_sptr() const
Get scanner shared pointer.
Definition ProjDataInfo.inl:218
int get_max_tangential_pos_num() const
Get maximum tangential position number.
Definition ProjDataInfo.inl:162
int get_max_axial_pos_num(const int segment_num) const
Get maximum axial position per segment.
Definition ProjDataInfo.inl:138
int get_min_segment_num() const
Get minimum segment number.
Definition ProjDataInfo.inl:120
int get_max_tof_pos_num() const
Get the index of the last timgin position.
Definition ProjDataInfo.inl:174
float get_costheta(const Bin &) const
Get cosine of the co-polar angle of the normal to the projection plane.
Definition ProjDataInfo.inl:200
int get_min_view_num() const
Get minimum view number.
Definition ProjDataInfo.inl:144
virtual float get_t(const Bin &) const =0
Get value of the (roughly) axial coordinate in the projection plane (in mm)
int get_max_view_num() const
Get maximum view number.
Definition ProjDataInfo.inl:150
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
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.
const Scanner * get_scanner_ptr() const
Get scanner pointer.
Definition ProjDataInfo.inl:212
std::size_t size_all() const
Get the total size of the data.
Definition ProjDataInfo.inl:240
int get_num_tof_poss() const
Get number of TOF bins.
Definition ProjDataInfo.inl:71
bool is_tof_data() const
Determine if TOF data from tof_mash_factor and num_tof_bins.
Definition ProjDataInfo.inl:180
int get_tof_mash_factor() const
Get TOF mash factor.
Definition ProjDataInfo.inl:114
int get_num_non_tof_sinograms() const
Get the number of non-tof sinograms.
Definition ProjDataInfo.inl:224
int get_num_tangential_poss() const
Get number of tangential positions.
Definition ProjDataInfo.inl:65
int get_max_segment_num() const
Get maximum segment number.
Definition ProjDataInfo.inl:126
A class for storing some info on the scanner.
Definition Scanner.h:108
void error(const char *const s,...)
Print error with format string a la printf and throw exception.
Definition error.cxx:42
void warning(const char *const s,...)
Print warning with format string a la printf.
Definition warning.cxx:41
NUMBER square(const NUMBER &x)
returns the square of a number, templated.
Definition common.h:154
Declaration of stir::warning()