STIR
6.2.0
|
Projection data info for data corresponding to a subset sampling by views. More...
#include "stir/ProjDataInfoSubsetByView.h"
Public Member Functions | |
ProjDataInfoSubsetByView (const shared_ptr< const ProjDataInfo > org_proj_data_info_sptr, const std::vector< int > &views) | |
Constructor setting relevant info for a ProjDataInfoSubsetByView. More... | |
ProjDataInfoSubsetByView * | clone () const override |
Clone the object. | |
bool | contains_full_data () const |
true if the subset is actually all of the data | |
std::vector< int > | get_original_view_nums () const override |
Get the view numbers of the original ProjDataInfo. | |
Bin | get_original_bin (const Bin &bin) const |
Get the Bin of the original ProjDataInfo corresponding to a Bin for this subset. | |
Bin | get_bin_from_original (const Bin &org_bin) const |
Get the Bin for this subset corresponding to a Bin of the original ProjDataInfo. | |
void | reduce_segment_range (const int min_segment_num, const int max_segment_num) override |
Set a new range of segment numbers for both this object and the original ProjDataInfo. More... | |
void | set_num_views (const int new_num_views) override |
Invalid for a subset! This will call error() | |
void | set_num_tangential_poss (const int num_tang_poss) override |
Set number of tangential positions. More... | |
void | set_num_axial_poss_per_segment (const VectorWithOffset< int > &num_axial_poss_per_segment) override |
Set number of axial positions per segment. More... | |
void | set_min_axial_pos_num (const int min_ax_pos_num, const int segment_num) override |
Set minimum axial position number for 1 segment. More... | |
void | set_max_axial_pos_num (const int max_ax_pos_num, const int segment_num) override |
Set maximum axial position number for 1 segment. More... | |
void | set_min_tangential_pos_num (const int min_tang_poss) override |
Set minimum tangential position number. More... | |
void | set_max_tangential_pos_num (const int max_tang_poss) override |
Set maximum tangential position number. More... | |
Bin | get_bin (const LOR< float > &, const double delta_time=0.0) const override |
Find the bin in the projection data that 'contains' an LOR. More... | |
bool | operator>= (const ProjDataInfo &proj) const override |
Check if *this contains proj . More... | |
std::string | parameter_info () const override |
Return a string describing the object. | |
shared_ptr< const ProjDataInfo > | get_original_proj_data_info_sptr () const |
Get a shared pointer to the original, fully sampled ProjDataInfo. | |
float | get_tantheta (const Bin &) const override |
Get tangent of the co-polar angle of the normal to the projection plane. More... | |
float | get_phi (const Bin &) const override |
Get azimuthal angle phi of the normal to the projection plane. More... | |
float | get_t (const Bin &) const override |
Get value of the (roughly) axial coordinate in the projection plane (in mm) More... | |
float | get_m (const Bin &) const override |
Return z-coordinate of the middle of the LOR (in mm) More... | |
float | get_s (const Bin &) const override |
Get value of the tangential coordinate in the projection plane (in mm) More... | |
void | get_LOR (LORInAxialAndNoArcCorrSinogramCoordinates< float > &, const Bin &) const override |
Get LOR corresponding to a given bin. More... | |
Functions that return info on the sampling in the different coordinates | |
float | get_sampling_in_t (const Bin &) const override |
Get sampling distance in the t coordinate. More... | |
float | get_sampling_in_m (const Bin &) const override |
Get sampling distance in the m coordinate. More... | |
float | get_sampling_in_s (const Bin &) const override |
Get sampling distance in the s coordinate. More... | |
Public Member Functions inherited from stir::ProjDataInfo | |
ProjDataInfo () | |
Construct an empty object. | |
ProjDataInfo (const shared_ptr< Scanner > &scanner_ptr, const VectorWithOffset< int > &num_axial_pos_per_segment, const int num_views, const int num_tangential_poss) | |
Constructor setting all relevant info for a ProjDataInfo. More... | |
ProjDataInfo (const shared_ptr< Scanner > &scanner_ptr, const VectorWithOffset< int > &num_axial_pos_per_segment, const int num_views, const int num_tangential_poss, const int tof_mash_factor) | |
Overloaded Contructor with TOF initialisation. | |
shared_ptr< ProjDataInfo > | create_shared_clone () const |
Like clone() but return a shared_ptr. | |
shared_ptr< ProjDataInfo > | create_non_tof_clone () const |
Similar to create_shared_clone() but returns a non-tof version of ProjDataInfo setting tof mashing factor = 0. | |
virtual | ~ProjDataInfo () |
Destructor. | |
bool | is_tof_data () const |
Determine if TOF data from tof_mash_factor and num_tof_bins. | |
const Scanner * | get_scanner_ptr () const |
Get scanner pointer. | |
shared_ptr< Scanner > | get_scanner_sptr () const |
Get scanner shared pointer. | |
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 TOF mashing, in mm, for faster access. More... | |
float | get_bed_position_horizontal () const |
Get horizontal bed position. | |
void | set_bed_position_vertical (const float bed_position_vertical_arg) |
Set vertical bed position. | |
float | get_bed_position_vertical () const |
Get vertical bed position. | |
bool | has_energy_information () const |
virtual void | set_tof_mash_factor (const int new_num) |
The tof mashing factor (for TOF scanners). More... | |
int | get_num_segments () const |
Get number of segments. | |
int | get_num_axial_poss (const int segment_num) const |
Get number of axial positions per segment. | |
int | get_num_views () const |
Get number of views. | |
int | get_num_tangential_poss () const |
Get number of tangential positions. | |
int | get_tof_bin (const double delta) const |
Get number of tof bin for a given time difference. | |
int | get_num_tof_poss () const |
Get number of TOF bins. | |
int | get_min_segment_num () const |
Get minimum segment number. | |
int | get_max_segment_num () const |
Get maximum segment number. | |
int | get_min_axial_pos_num (const int segment_num) const |
Get minimum axial position per segmnet. | |
int | get_max_axial_pos_num (const int segment_num) const |
Get maximum axial position per segment. | |
int | get_min_view_num () const |
Get minimum view number. | |
int | get_max_view_num () const |
Get maximum view number. | |
int | get_min_tangential_pos_num () const |
Get minimum tangential position number. | |
int | get_max_tangential_pos_num () const |
Get maximum tangential position number. | |
int | get_tof_mash_factor () const |
Get TOF mash factor. | |
int | get_min_tof_pos_num () const |
Get the index of the first TOF position. | |
int | get_max_tof_pos_num () const |
Get the index of the last timgin position. | |
int | get_num_sinograms () const |
Get the total number of sinograms. More... | |
int | get_num_non_tof_sinograms () const |
Get the number of non-tof sinograms. More... | |
std::size_t | size_all () const |
Get the total size of the data. | |
float | get_costheta (const Bin &) const |
Get cosine of the co-polar angle of the normal to the projection plane. More... | |
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 two detectors. | |
double | get_tof_delta_time (const Bin &) const |
Get the value of the TOF timing difference (in ps) | |
float | get_sampling_in_k (const Bin &) const |
Get sampling distance in the k coordinate . | |
bool | operator== (const ProjDataInfo &proj) const |
check equality | |
bool | operator!= (const ProjDataInfo &proj) const |
Viewgram< float > | get_empty_viewgram (const ViewgramIndices &) const |
Get empty viewgram. | |
Sinogram< float > | get_empty_sinogram (const SinogramIndices &) const |
Get empty_sinogram. | |
SegmentByView< float > | get_empty_segment_by_view (const SegmentIndices &) const |
Get empty segment sino. | |
SegmentBySinogram< float > | get_empty_segment_by_sinogram (const SegmentIndices &) const |
Get empty segment view. | |
Viewgram< float > | get_empty_viewgram (const int view_num, const int segment_num, const bool make_num_tangential_poss_odd=false, const int timing_pos_num=0) const |
Get empty viewgram. More... | |
Sinogram< float > | get_empty_sinogram (const int ax_pos_num, const int segment_num, const bool make_num_tangential_poss_odd=false, const int timing_pos_num=0) const |
Get empty_sinogram. More... | |
SegmentByView< float > | get_empty_segment_by_view (const int segment_num, const bool make_num_tangential_poss_odd=false, const int timing_pos_num=0) const |
Get empty segment sino. More... | |
SegmentBySinogram< float > | get_empty_segment_by_sinogram (const int segment_num, const bool make_num_tangential_poss_odd=false, const int timing_pos_num=0) const |
Get empty segment view. More... | |
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. More... | |
Protected Member Functions | |
bool | blindly_equals (const root_type *const) const override |
Additional Inherited Members | |
Static Public Member Functions inherited from stir::ProjDataInfo | |
static ProjDataInfo * | ask_parameters () |
Ask for the details and return a ProjDataInfo pointer. | |
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. More... | |
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() More... | |
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. More... | |
Public Attributes inherited from stir::ProjDataInfo | |
VectorWithOffset< Float1Float2 > | tof_bin_boundaries_mm |
Vector which holds the lower and higher boundary for each TOF position in mm, for faster access. | |
VectorWithOffset< Float1Float2 > | tof_bin_boundaries_ps |
Vector which holds the lower and higher boundary for each TOF position in ps`, for faster access. | |
Protected Types inherited from stir::ProjDataInfo | |
typedef ProjDataInfo | root_type |
Projection data info for data corresponding to a subset sampling by views.
The class maintains a reference to the 'original' fully sampled ProjDataInfo and defers to this object where possible.
stir::ProjDataInfoSubsetByView::ProjDataInfoSubsetByView | ( | const shared_ptr< const ProjDataInfo > | org_proj_data_info_sptr, |
const std::vector< int > & | views | ||
) |
Constructor setting relevant info for a ProjDataInfoSubsetByView.
[in] | org_proj_data_info_sptr | is the original, fully sampled ProjDataInfo to subset. |
[in] | views | are the views to subset over. |
References stir::error(), stir::ProjDataInfo::set_bed_position_horizontal(), stir::ProjDataInfo::set_bed_position_vertical(), set_max_axial_pos_num(), and set_min_axial_pos_num().
Referenced by clone().
|
overridevirtual |
Set a new range of segment numbers for both this object and the original ProjDataInfo.
Reimplemented from stir::ProjDataInfo.
References stir::ProjDataInfo::reduce_segment_range().
|
overridevirtual |
Set number of tangential positions.
Reimplemented from stir::ProjDataInfo.
References stir::ProjDataInfo::set_num_tangential_poss().
|
overridevirtual |
Set number of axial positions per segment.
Forwards ProjDataInfo::set_num_axial_poss_per_segment
Reimplemented from stir::ProjDataInfo.
References stir::ProjDataInfo::set_num_axial_poss_per_segment().
|
overridevirtual |
Set minimum axial position number for 1 segment.
Reimplemented from stir::ProjDataInfo.
References stir::ProjDataInfo::set_min_axial_pos_num().
Referenced by ProjDataInfoSubsetByView().
|
overridevirtual |
Set maximum axial position number for 1 segment.
Reimplemented from stir::ProjDataInfo.
References stir::ProjDataInfo::set_max_axial_pos_num().
Referenced by ProjDataInfoSubsetByView().
|
overridevirtual |
Set minimum tangential position number.
Reimplemented from stir::ProjDataInfo.
References stir::ProjDataInfo::set_min_tangential_pos_num().
|
overridevirtual |
Set maximum tangential position number.
Reimplemented from stir::ProjDataInfo.
References stir::ProjDataInfo::set_max_tangential_pos_num().
|
overridevirtual |
Get tangent of the co-polar angle of the normal to the projection plane.
Forwards ProjDataInfo::get_tantheta
Implements stir::ProjDataInfo.
References get_original_bin().
|
overridevirtual |
Get azimuthal angle phi of the normal to the projection plane.
phi=0 when the normal vector has no component along the horizontal axis
Implements stir::ProjDataInfo.
References get_original_bin().
|
overridevirtual |
Get value of the (roughly) axial coordinate in the projection plane (in mm)
Forwards ProjDataInfo::get_t
Implements stir::ProjDataInfo.
References get_original_bin().
|
overridevirtual |
Return z-coordinate of the middle of the LOR (in mm)
Forwards ProjDataInfo::get_m
Reimplemented from stir::ProjDataInfo.
References get_original_bin().
|
overridevirtual |
Get value of the tangential coordinate in the projection plane (in mm)
Forwards ProjDataInfo::get_s
Implements stir::ProjDataInfo.
References get_original_bin().
|
overridevirtual |
Get LOR corresponding to a given bin.
Forwards ProjDataInfo::get_LOR
Implements stir::ProjDataInfo.
References get_original_bin().
|
overridevirtual |
Get sampling distance in the t
coordinate.
Forwards ProjDataInfo::get_sampling_in_t
Reimplemented from stir::ProjDataInfo.
References get_original_bin().
|
overridevirtual |
Get sampling distance in the m
coordinate.
Forwards ProjDataInfo::get_sampling_in_m
Reimplemented from stir::ProjDataInfo.
References get_original_bin().
|
overridevirtual |
Get sampling distance in the s
coordinate.
Forwards ProjDataInfo::get_sampling_in_s
Reimplemented from stir::ProjDataInfo.
References get_original_bin().
|
overridevirtual |
Find the bin in the projection data that 'contains' an LOR.
Forwards ProjDataInfo::get_bin
Implements stir::ProjDataInfo.
References get_bin_from_original().
|
overridevirtual |
Check if *this
contains proj
.
Like ProjDataInfo, will only compare for the same type with one expection: if this object contains the full data will attempt to compare the original ProjDataInfo against proj.
Reimplemented from stir::ProjDataInfo.
References contains_full_data().
|
overrideprotectedvirtual |
Default implementation checks common variables. Needs to be overloaded.
Implements stir::ProjDataInfo.