STIR
6.2.0
|
A class for encoding/finding symmetries common to the geometry of the projection data and the discretised density. More...
#include "stir/recon_buildblock/DataSymmetriesForBins.h"
Public Member Functions | |
DataSymmetriesForBins (const shared_ptr< const ProjDataInfo > &proj_data_info_ptr) | |
DataSymmetriesForBins * | clone () const override=0 |
void | get_related_bins (std::vector< Bin > &, const Bin &b) const |
fills in a vector with all the bins that are related to 'b' (including itself) More... | |
virtual void | get_related_bins (std::vector< Bin > &, const Bin &b, const int min_axial_pos_num, const int max_axial_pos_num, const int min_tangential_pos_num, const int max_tangential_pos_num, const int min_timing_pos_num, const int max_timing_pos_num) const |
fills in a vector with all the bins (within the range) that are related to 'b' More... | |
void | get_related_bins_factorised (std::vector< AxTangPosNumbers > &, const Bin &b) const |
fills in a vector with the axial and tangential position numbers related to this bin More... | |
virtual void | get_related_bins_factorised (std::vector< AxTangPosNumbers > &, const Bin &b, const int min_axial_pos_num, const int max_axial_pos_num, const int min_tangential_pos_num, const int max_tangential_pos_num) const =0 |
fills in a vector with the axial and tangential position numbers related to this bin More... | |
virtual int | num_related_bins (const Bin &b) const |
returns the number of bins related to 'b' More... | |
virtual unique_ptr< SymmetryOperation > | find_symmetry_operation_from_basic_bin (Bin &) const =0 |
given an arbitrary bin 'b', find the basic bin and the corresponding symmetry operation More... | |
virtual bool | find_basic_bin (Bin &b) const |
given an arbitrary bin 'b', find the basic bin More... | |
virtual bool | is_basic (const Bin &v_s) const |
test if a bin is 'basic' More... | |
virtual unique_ptr< SymmetryOperation > | find_symmetry_operation_from_basic_view_segment_numbers (ViewSegmentNumbers &) const |
default implementation in terms of find_symmetry_operation_from_basic_bin | |
Public Member Functions inherited from stir::DataSymmetriesForViewSegmentNumbers | |
bool | operator== (const DataSymmetriesForViewSegmentNumbers &) const |
Check equality. More... | |
bool | operator!= (const DataSymmetriesForViewSegmentNumbers &) const |
Check inequality. More... | |
virtual void | get_related_view_segment_numbers (std::vector< ViewSegmentNumbers > &, const ViewSegmentNumbers &v_s) const =0 |
fills in a vector with all the view/segments that are related to 'v_s' (including itself) | |
virtual int | num_related_view_segment_numbers (const ViewSegmentNumbers &v_s) const |
returns the number of view_segment_numbers related to 'v_s' More... | |
std::size_t | num_related_viewgram_indices (const ViewgramIndices &ind) const |
virtual bool | find_basic_view_segment_numbers (ViewSegmentNumbers &v_s) const =0 |
given an arbitrary view/segment, find the basic view/segment More... | |
virtual bool | is_basic (const ViewSegmentNumbers &v_s) const |
test if a view/segment is 'basic' More... | |
Protected Member Functions | |
bool | blindly_equals (const root_type *const) const override=0 |
Check equality. | |
Protected Attributes | |
const shared_ptr< const ProjDataInfo > | proj_data_info_ptr |
Member storing the info needed by get_related_bins() et al. | |
Additional Inherited Members | |
Protected Types inherited from stir::DataSymmetriesForViewSegmentNumbers | |
typedef DataSymmetriesForViewSegmentNumbers | root_type |
A class for encoding/finding symmetries common to the geometry of the projection data and the discretised density.
This class is mainly (only?) useful for ProjMatrixByBin classes and their 'users'. Together with SymmetryOperation, it provides the basic way to be able to write generic code without knowing which particular symmetries the data have.
|
inline |
fills in a vector with all the bins that are related to 'b' (including itself)
range for axial_pos_num and tangential_pos_num is taken from the ProjDataInfo object passed in the constructor
b
has to be a 'basic' bin References stir::SegmentIndices::segment_num().
|
virtual |
fills in a vector with all the bins (within the range) that are related to 'b'
b
has to be a 'basic' bindefault implementation in terms of get_related_bins_factorised
Reimplemented in stir::TrivialDataSymmetriesForBins.
References stir::SegmentIndices::segment_num(), and stir::ViewgramIndices::view_num().
|
inline |
fills in a vector with the axial and tangential position numbers related to this bin
range for axial_pos_num and tangential_pos_num is taken from the ProjDataInfo object passed in the constructor
b
has to be a 'basic' bin References stir::SegmentIndices::segment_num().
Referenced by stir::BackProjectorByBinUsingProjMatrixByBin::actual_back_project(), and stir::ForwardProjectorByBinUsingProjMatrixByBin::get_symmetries_used().
|
pure virtual |
fills in a vector with the axial and tangential position numbers related to this bin
It is guaranteed (or at least, it should be by the implementation of the derived class) that these AxTangPosNumbers are related for all related ViewSegmentNumbers for this bin.
So, you can find all related bins by calling get_related_ViewSegmentNumbers() and get_related_bins_factorised(), which is what the default implementation does. (A derived class might do this in a more optimal way.)
b
has to be a 'basic' bin Implemented in stir::DataSymmetriesForBins_PET_CartesianGrid, and stir::TrivialDataSymmetriesForBins.
|
virtual |
returns the number of bins related to 'b'
default implementation in terms of get_related_bins, will be slow of course
Reimplemented in stir::DataSymmetriesForBins_PET_CartesianGrid, and stir::TrivialDataSymmetriesForBins.
|
pure virtual |
given an arbitrary bin 'b', find the basic bin and the corresponding symmetry operation
sets 'b' to the corresponding 'basic' bin and returns the symmetry transformation from 'basic' to 'b'.
Implemented in stir::DataSymmetriesForBins_PET_CartesianGrid, and stir::TrivialDataSymmetriesForBins.
Referenced by stir::BackProjectorByBinUsingProjMatrixByBin::actual_back_project(), stir::ProjMatrixElemsForOneBin::back_project(), stir::ProjMatrixElemsForOneBin::forward_project(), and stir::ForwardProjectorByBinUsingProjMatrixByBin::get_symmetries_used().
|
virtual |
given an arbitrary bin 'b', find the basic bin
sets 'b' to the corresponding 'basic' bin and returns true if 'b' is changed (i.e. it was NOT a basic bin).
default implementation in terms of find_symmetry_operation_from_basic_bin
Reimplemented in stir::DataSymmetriesForBins_PET_CartesianGrid, and stir::TrivialDataSymmetriesForBins.
Referenced by stir::BackProjectorByBinUsingProjMatrixByBin::actual_back_project(), and stir::ForwardProjectorByBinUsingProjMatrixByBin::get_symmetries_used().
|
virtual |
test if a bin is 'basic'
The default implementation uses find_basic_bin
Reimplemented in stir::TrivialDataSymmetriesForBins.