STIR  6.2.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
stir::ProjDataInfoCylindrical Class Referenceabstract

projection data info for data corresponding to a 'cylindrical' sampling. More...

#include "stir/ProjDataInfoCylindrical.h"

Inheritance diagram for stir::ProjDataInfoCylindrical:
Inheritance graph
[legend]

Public Types

typedef std::vector< std::pair< int, int > > RingNumPairs
 Type used by get_all_ring_pairs_for_segment_axial_pos_num()
 

Public Member Functions

 ProjDataInfoCylindrical ()
 Constructors.
 
 ProjDataInfoCylindrical (const shared_ptr< Scanner > &scanner_ptr, const VectorWithOffset< int > &num_axial_poss_per_segment, const VectorWithOffset< int > &min_ring_diff, const VectorWithOffset< int > &max_ring_diff, const int num_views, const int num_tangential_poss)
 Constructor given all the necessary information. More...
 
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. More...
 
void get_LOR (LORInAxialAndNoArcCorrSinogramCoordinates< float > &lor, const Bin &bin) const override
 Get LOR corresponding to a given bin. More...
 
void set_azimuthal_angle_offset (const float angle)
 Set azimuthal angle offset (in radians)
 
void set_azimuthal_angle_sampling (const float angle)
 Set the azimuthal sampling (in radians)
 
void set_num_views (const int new_num_views) override
 set new number of views, covering the same azimuthal angle range More...
 
void set_tof_mash_factor (const int new_num) override
 The tof mashing factor (for TOF scanners). More...
 
float get_azimuthal_angle_offset () const
 Get azimuthal angle offset (in radians)
 
float get_azimuthal_angle_sampling () const
 Get the azimuthal sampling (in radians)
 
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...
 
virtual float get_axial_sampling (int segment_num) const
 Get the axial sampling (e.g in z_direction) More...
 
virtual bool axial_sampling_is_uniform () const
 Return if axial sampling makes sense. More...
 
float get_average_ring_difference (int segment_num) const
 Get average ring difference for the given segment.
 
int get_min_ring_difference (int segment_num) const
 Get minimum ring difference for the given segment.
 
int get_max_ring_difference (int segment_num) const
 Get maximum ring difference for the given segment.
 
void set_min_ring_difference (int min_ring_diff_v, int segment_num)
 Set minimum ring difference.
 
void set_max_ring_difference (int max_ring_diff_v, int segment_num)
 Set maximum ring difference.
 
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 reduce_segment_range (const int min_segment_num, const int max_segment_num) override
 Set a new range of segment numbers. More...
 
void set_ring_radii_for_all_views (const VectorWithOffset< float > &new_ring_radius)
 Set detector ring radius for all views.
 
VectorWithOffset< float > get_ring_radii_for_all_views () const
 Get detector ring radius for all views.
 
float get_ring_radius () const
 Get detector ring radius.
 
float get_ring_radius (const int view_num) const
 
float get_ring_spacing () const
 Get detector ring spacing.
 
void set_ring_spacing (float ring_spacing_v)
 Set detector ring spacing.
 
int get_view_mashing_factor () const
 Get the mashing factor, i.e. how many 'original' views are combined. More...
 
Succeeded get_segment_num_for_ring_difference (int &segment_num, const int ring_diff) const
 Find which segment a particular ring difference belongs to. More...
 
Succeeded get_segment_axial_pos_num_for_ring_pair (int &segment_num, int &axial_pos_num, const int ring1, const int ring2) const
 Find to which segment and axial position a ring pair contributes. More...
 
const RingNumPairsget_all_ring_pairs_for_segment_axial_pos_num (const int segment_num, const int axial_pos_num) const
 Find all ring pairs that contribute to a segment and axial position. More...
 
unsigned get_num_ring_pairs_for_segment_axial_pos_num (const int segment_num, const int axial_pos_num) const
 Find the number of ring pairs that contribute to a segment and axial position. More...
 
void get_ring_pair_for_segment_axial_pos_num (int &ring1, int &ring2, const int segment_num, const int axial_pos_num) const
 Find a ring pair that contributes to a segment and axial position. More...
 
std::string parameter_info () const override
 Return a string describing the object.
 
- 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.
 
virtual ProjDataInfoclone () const =0
 Standard trick for a 'virtual copy-constructor'.
 
shared_ptr< ProjDataInfocreate_shared_clone () const
 Like clone() but return a shared_ptr.
 
shared_ptr< ProjDataInfocreate_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.
 
virtual std::vector< int > get_original_view_nums () const
 Return a list of view numbers in the "original" data if subsets are used. More...
 
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. More...
 
const Scannerget_scanner_ptr () const
 Get scanner pointer.
 
shared_ptr< Scannerget_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_num_tangential_poss (const int num_tang_poss)
 Set number of tangential positions. More...
 
virtual void set_min_tangential_pos_num (const int min_tang_poss)
 Set minimum tangential position number. More...
 
virtual void set_max_tangential_pos_num (const int max_tang_poss)
 Set maximum tangential position number. 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...
 
virtual float get_s (const Bin &) const =0
 Get value of the tangential coordinate in the projection plane (in mm) 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)
 
virtual float get_sampling_in_s (const Bin &) const
 Get sampling distance in the s coordinate. More...
 
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
 
virtual bool operator>= (const ProjDataInfo &proj) const
 Check if *this contains proj. More...
 
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=0
 

Protected Attributes

bool sampling_corresponds_to_physical_rings
 a variable that is set if the data corresponds to physical rings in the scanner More...
 

Additional Inherited Members

- Static Public Member Functions inherited from stir::ProjDataInfo
static ProjDataInfoask_parameters ()
 Ask for the details and return a ProjDataInfo pointer.
 
static ProjDataInfoProjDataInfoGE (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 ProjDataInfoProjDataInfoCTI (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< ProjDataInfoconstruct_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< Float1Float2tof_bin_boundaries_mm
 Vector which holds the lower and higher boundary for each TOF position in mm, for faster access.
 
VectorWithOffset< Float1Float2tof_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
 

Detailed Description

projection data info for data corresponding to a 'cylindrical' sampling.

These data are organised by ring differences (allowing for merging of some ring differences into 1 segment). The class is general enough to have both the CTI 'spanned' format, and the GE Advance format.

Constructor & Destructor Documentation

◆ ProjDataInfoCylindrical()

stir::ProjDataInfoCylindrical::ProjDataInfoCylindrical ( const shared_ptr< Scanner > &  scanner_ptr,
const VectorWithOffset< int > &  num_axial_poss_per_segment,
const VectorWithOffset< int > &  min_ring_diff,
const VectorWithOffset< int > &  max_ring_diff,
const int  num_views,
const int  num_tangential_poss 
)

Member Function Documentation

◆ get_tantheta()

float stir::ProjDataInfoCylindrical::get_tantheta ( const Bin ) const
inlineoverridevirtual

Get tangent of the co-polar angle of the normal to the projection plane.

theta=0 for 'direct' planes (i.e. projection planes parallel to the scanner axis)

Implements stir::ProjDataInfo.

Reimplemented in stir::ProjDataInfoGeneric.

References stir::SegmentIndices::segment_num(), stir::square(), and stir::ViewgramIndices::view_num().

Referenced by get_LOR(), and stir::ProjDataInfoCylindricalArcCorrTests::run_tests().

◆ get_phi()

float stir::ProjDataInfoCylindrical::get_phi ( const Bin ) const
inlineoverridevirtual

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.

Reimplemented in stir::ProjDataInfoGeneric.

References stir::ViewgramIndices::view_num().

Referenced by get_LOR(), and stir::ProjDataInfoCylindricalArcCorrTests::run_tests().

◆ get_t()

float stir::ProjDataInfoCylindrical::get_t ( const Bin ) const
inlineoverridevirtual

Get value of the (roughly) axial coordinate in the projection plane (in mm)

t-axis is defined to be orthogonal to the s-axis (and to the vector normal to the projection plane

Implements stir::ProjDataInfo.

Reimplemented in stir::ProjDataInfoGeneric.

◆ get_m()

float stir::ProjDataInfoCylindrical::get_m ( const Bin bin) const
inlineoverridevirtual

Return z-coordinate of the middle of the LOR.

The 0 of the z-axis is chosen in the middle of the scanner.

Warning
Current implementation assumes that the axial positions are always 'centred', i.e. get_m(Bin(..., min_axial_pos_num,...)) == - get_m(Bin(..., max_axial_pos_num,...))

Reimplemented from stir::ProjDataInfo.

Reimplemented in stir::ProjDataInfoGeneric.

References stir::Bin::axial_pos_num(), and stir::SegmentIndices::segment_num().

Referenced by stir::ProjDataInfoCylindricalNoArcCorr::get_bin(), get_LOR(), and stir::SSRB().

◆ get_LOR()

void stir::ProjDataInfoCylindrical::get_LOR ( LORInAxialAndNoArcCorrSinogramCoordinates< float > &  ,
const Bin  
) const
overridevirtual

◆ set_num_views()

void stir::ProjDataInfoCylindrical::set_num_views ( const int  new_num_views)
overridevirtual

set new number of views, covering the same azimuthal angle range

calls ProjDataInfo::set_num_views(), but makes sure that we cover the same range of angles as before (usually, but not necessarily, 180 degrees) by adjusting azimuthal_angle_sampling.

Warning
This function does not change the azimutal_angle_offset, such that the first view returns the same get_phi. Depending on what you want, you might have to call set_azimuthal_angle_offset() as well.

Reimplemented from stir::ProjDataInfo.

Reimplemented in stir::ProjDataInfoGeneric.

References get_azimuthal_angle_sampling(), stir::ProjDataInfo::get_num_views(), and stir::ProjDataInfo::set_num_views().

Referenced by stir::SSRB().

◆ set_tof_mash_factor()

void stir::ProjDataInfoCylindrical::set_tof_mash_factor ( const int  new_num)
overridevirtual

The tof mashing factor (for TOF scanners).

Set to 0 for non-TOF

Min and Max timing position will be recalculated.

Todo:
N.E: This function is very ugly and unnessesary complicated. Could be much better.
Todo:
N.E. Would be nice to have all the points of the scanner in cache.

Reimplemented from stir::ProjDataInfo.

References stir::ProjDataInfo::set_tof_mash_factor().

Referenced by stir::ProjDataInfoCylindricalNoArcCorr::ProjDataInfoCylindricalNoArcCorr(), and stir::SSRB().

◆ get_sampling_in_t()

float stir::ProjDataInfoCylindrical::get_sampling_in_t ( const Bin bin) const
inlineoverridevirtual

Get sampling distance in the t coordinate.

For some coordinate systems, this might depend on the Bin. The default implementation computes it as

1/2(get_t(..., ax_pos+1,...)-get_t(..., ax_pos-1,...)))

Reimplemented from stir::ProjDataInfo.

Reimplemented in stir::ProjDataInfoGeneric.

References stir::SegmentIndices::segment_num().

◆ get_sampling_in_m()

float stir::ProjDataInfoCylindrical::get_sampling_in_m ( const Bin bin) const
inlineoverridevirtual

Get sampling distance in the m coordinate.

For some coordinate systems, this might depend on the Bin. The default implementation computes it as

1/2(get_m(..., ax_pos+1,...)-get_m(..., ax_pos-1,...)))

Reimplemented from stir::ProjDataInfo.

Reimplemented in stir::ProjDataInfoGeneric.

References stir::SegmentIndices::segment_num().

◆ get_axial_sampling()

float stir::ProjDataInfoCylindrical::get_axial_sampling ( int  segment_num) const
inlinevirtual

Get the axial sampling (e.g in z_direction)

Warning
The implementation of this function currently assumes that the axial sampling is equal to the ring spacing for non-spanned data (i.e. no axial compression), while it is half the ring spacing for spanned data.

Reimplemented in stir::ProjDataInfoGeneric.

Referenced by stir::ProjDataInfoCylindricalNoArcCorr::get_bin(), ProjDataInfoCylindrical(), stir::ProjDataInfoCylindricalArcCorrTests::run_tests(), stir::ProjMatrixByBinSPECTUB::set_up(), stir::ProjMatrixByBinPinholeSPECTUB::set_up(), and stir::SSRB().

◆ axial_sampling_is_uniform()

virtual bool stir::ProjDataInfoCylindrical::axial_sampling_is_uniform ( ) const
inlinevirtual

Return if axial sampling makes sense.

could be false for block/generic cases

Reimplemented in stir::ProjDataInfoGeneric.

◆ set_num_axial_poss_per_segment()

void stir::ProjDataInfoCylindrical::set_num_axial_poss_per_segment ( const VectorWithOffset< int > &  num_axial_poss_per_segment)
overridevirtual

Set number of axial positions per segment.

Parameters
num_axial_poss_per_segmentis a vector with the new numbers, where the index into the vector is the segment_num (i.e. it is not related to the storage order of the segments or so).

This function is virtual in case a derived class needs to know the number of axial positions changed.

Sets min_axial_pos_per_seg to 0

Reimplemented from stir::ProjDataInfo.

References stir::ProjDataInfo::set_num_axial_poss_per_segment().

◆ set_min_axial_pos_num()

void stir::ProjDataInfoCylindrical::set_min_axial_pos_num ( const int  min_ax_pos_num,
const int  segment_num 
)
overridevirtual

Set minimum axial position number for 1 segment.

This function is virtual in case a derived class needs to know the number changed.

No checks are done on validity of the min_ax_pos_num argument

Reimplemented from stir::ProjDataInfo.

References stir::ProjDataInfo::set_min_axial_pos_num().

Referenced by stir::SSRB().

◆ set_max_axial_pos_num()

void stir::ProjDataInfoCylindrical::set_max_axial_pos_num ( const int  max_ax_pos_num,
const int  segment_num 
)
overridevirtual

Set maximum axial position number for 1 segment.

This function is virtual in case a derived class needs to know the number changed.

No checks are done on validity of the max_ax_pos_num argument

Reimplemented from stir::ProjDataInfo.

References stir::ProjDataInfo::set_max_axial_pos_num().

Referenced by stir::SSRB().

◆ reduce_segment_range()

void stir::ProjDataInfoCylindrical::reduce_segment_range ( const int  min_segment_num,
const int  max_segment_num 
)
overridevirtual

Set a new range of segment numbers.

This function is virtual in case a derived class needs to know the segment range changed.

Warning
the new range has to be 'smaller' than the old one.

Reimplemented from stir::ProjDataInfo.

References stir::ProjDataInfo::reduce_segment_range().

Referenced by stir::SSRB().

◆ get_view_mashing_factor()

int stir::ProjDataInfoCylindrical::get_view_mashing_factor ( ) const
inline

Get the mashing factor, i.e. how many 'original' views are combined.

This gets the result by comparing the number of detectors in the scanner_ptr with the actual number of views.

Warning
In the debug version, it is checked with an assert() that the number of detectors is an even multiple of the number of views. This is not checked in the normal version though.

Referenced by stir::ProjDataInfoGenericNoArcCorr::get_all_det_pos_pairs_for_bin(), stir::ProjDataInfoCylindricalNoArcCorr::get_all_det_pos_pairs_for_bin(), stir::LmToProjData::get_compression_count(), stir::ProjDataInfoGenericNoArcCorr::get_num_det_pos_pairs_for_bin(), stir::ProjDataInfoCylindricalNoArcCorr::get_num_det_pos_pairs_for_bin(), ProjDataInfoCylindrical(), and stir::ProjDataInfoCylindricalNoArcCorrTests::run_tests().

◆ get_segment_num_for_ring_difference()

Succeeded stir::ProjDataInfoCylindrical::get_segment_num_for_ring_difference ( int &  segment_num,
const int  ring_diff 
) const
inline

Find which segment a particular ring difference belongs to.

Returns
Succeeded::yes when a corresponding segment was found.

◆ get_segment_axial_pos_num_for_ring_pair()

Succeeded stir::ProjDataInfoCylindrical::get_segment_axial_pos_num_for_ring_pair ( int &  segment_num,
int &  axial_pos_num,
const int  ring1,
const int  ring2 
) const
inline

Find to which segment and axial position a ring pair contributes.

ring1, ring2 have to between 0 and scanner.get_num_rings()-1.

Returns
Succeeded::yes when a corresponding segment was found.
Warning
axial_pos_num returned might be outside the actual range in the proj_data_info.

For CTI data with span, this essentially implements a 'michelogram'.

Warning
Current implementation assumes that the axial positions start from 0 for the first ring-pair in the segment.
The implementation of this function currently assumes that the axial sampling is equal to the ring spacing for non-spanned data (i.e. no axial compression), while it is half the ring spacing for spanned data.

Referenced by stir::ProjDataInfoCylindricalNoArcCorr::get_bin().

◆ get_all_ring_pairs_for_segment_axial_pos_num()

const ProjDataInfoCylindrical::RingNumPairs & stir::ProjDataInfoCylindrical::get_all_ring_pairs_for_segment_axial_pos_num ( const int  segment_num,
const int  axial_pos_num 
) const
inline

Find all ring pairs that contribute to a segment and axial position.

ring1, ring2 will be between 0 and scanner.get_num_rings()-1.

Warning
The implementation of this function currently assumes that the axial sampling is equal to the ring spacing for non-spanned data (i.e. no axial compression), while it is half the ring spacing for spanned data.

Referenced by stir::ProjDataInfoGenericNoArcCorr::get_all_det_pos_pairs_for_bin(), and stir::ProjDataInfoCylindricalNoArcCorr::get_all_det_pos_pairs_for_bin().

◆ get_num_ring_pairs_for_segment_axial_pos_num()

unsigned stir::ProjDataInfoCylindrical::get_num_ring_pairs_for_segment_axial_pos_num ( const int  segment_num,
const int  axial_pos_num 
) const
inline

Find the number of ring pairs that contribute to a segment and axial position.

Warning
The implementation of this function currently assumes that the axial sampling is equal to the ring spacing for non-spanned data (i.e. no axial compression), while it is half the ring spacing for spanned data.

Referenced by stir::LmToProjData::get_compression_count(), stir::ProjDataInfoGenericNoArcCorr::get_num_det_pos_pairs_for_bin(), and stir::ProjDataInfoCylindricalNoArcCorr::get_num_det_pos_pairs_for_bin().

◆ get_ring_pair_for_segment_axial_pos_num()

void stir::ProjDataInfoCylindrical::get_ring_pair_for_segment_axial_pos_num ( int &  ring1,
int &  ring2,
const int  segment_num,
const int  axial_pos_num 
) const

Find a ring pair that contributes to a segment and axial position.

ring1, ring2 will be between 0 and scanner.get_num_rings()-1.

Warning
Currently only works when no axial compression is used for the segment (i.e. min_ring_diff = max_ring_diff). Otherwise, a error() will be called.
The implementation of this function currently assumes that the axial sampling is equal to the ring spacing for non-spanned data (i.e. no axial compression), while it is half the ring spacing for spanned data.

References stir::error(), get_max_ring_difference(), get_min_ring_difference(), and sampling_corresponds_to_physical_rings.

Referenced by stir::DataSymmetriesForBins_PET_CartesianGrid::find_basic_view_segment_numbers(), and stir::DataSymmetriesForBins_PET_CartesianGrid::num_related_bins().

◆ blindly_equals()

bool stir::ProjDataInfoCylindrical::blindly_equals ( const root_type * const  that) const
overrideprotectedpure virtual

Member Data Documentation

◆ sampling_corresponds_to_physical_rings

bool stir::ProjDataInfoCylindrical::sampling_corresponds_to_physical_rings
protected

a variable that is set if the data corresponds to physical rings in the scanner

This is (only) used to prevent get_segment_axial_pos_num_for_ring_pair() et al to go wild. Indeed, for cases where there's cylindrical sampling, but not really any physical rings associated to the sampling, those functions will return invalid information.

The prime case where this is used is for data corresponding to (nearly) continuous detectors, such as DHCI systems, or the HiDAC.

Ideally, this would be done by having a separate class for such systems which does not contain the ring-difference et al information. This seems to make the hierarchy too complicated though.

Bug:
The value of this variable is currently set by checking if the scanner is a HiDAC scanner. This needs to be changed.

Referenced by blindly_equals(), get_ring_pair_for_segment_axial_pos_num(), and ProjDataInfoCylindrical().


The documentation for this class was generated from the following files: