|
STIR 6.4.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) | |
| 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' | |
| 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 | |
| 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 | |
| virtual int | num_related_bins (const Bin &b) const |
| returns the number of bins related to 'b' | |
| 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 | |
| virtual bool | find_basic_bin (Bin &b) const |
| given an arbitrary bin 'b', find the basic bin | |
| virtual bool | is_basic (const Bin &v_s) const |
| test if a bin is 'basic' | |
| 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. | |
| bool | operator!= (const DataSymmetriesForViewSegmentNumbers &) const |
| Check inequality. | |
| 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' | |
| 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 | |
| virtual bool | is_basic (const ViewSegmentNumbers &v_s) const |
| test if a view/segment is 'basic' | |
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.
|
overridepure virtual |
Implements stir::DataSymmetriesForViewSegmentNumbers.
|
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 get_related_bins(), proj_data_info_ptr, and stir::SegmentIndices::segment_num().
Referenced by get_related_bins(), get_related_bins(), and num_related_bins().
|
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 find_basic_bin(), get_related_bins(), get_related_bins_factorised(), stir::DataSymmetriesForViewSegmentNumbers::get_related_view_segment_numbers(), 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 get_related_bins_factorised(), proj_data_info_ptr, and stir::SegmentIndices::segment_num().
Referenced by stir::BackProjectorByBinUsingProjMatrixByBin::actual_back_project(), get_related_bins(), and get_related_bins_factorised().
|
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.
References num_related_bins().
|
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.
References get_related_bins(), and num_related_bins().
Referenced by stir::PoissonLogLikelihoodWithLinearModelForMeanAndListModeDataWithProjMatrixByBin< TargetT >::actual_subsets_are_approximately_balanced(), get_related_bins_factorised(), and num_related_bins().
|
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.
References find_basic_bin(), find_symmetry_operation_from_basic_view_segment_numbers(), and is_basic().
Referenced by stir::BackProjectorByBinUsingProjMatrixByBin::actual_back_project(), stir::ProjMatrixElemsForOneBin::back_project(), find_basic_bin(), find_symmetry_operation_from_basic_view_segment_numbers(), and stir::ProjMatrixElemsForOneBin::forward_project().
|
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.
References find_basic_bin(), and find_symmetry_operation_from_basic_bin().
Referenced by stir::BackProjectorByBinUsingProjMatrixByBin::actual_back_project(), find_basic_bin(), find_symmetry_operation_from_basic_bin(), get_related_bins(), is_basic(), and stir::ProjMatrixByBinFromFile::write_to_file().
|
virtual |
test if a bin is 'basic'
The default implementation uses find_basic_bin
Reimplemented in stir::TrivialDataSymmetriesForBins.
References find_basic_bin(), and is_basic().
Referenced by find_symmetry_operation_from_basic_bin(), and is_basic().
|
virtual |
default implementation in terms of find_symmetry_operation_from_basic_bin
Reimplemented in stir::TrivialDataSymmetriesForBins.
References find_symmetry_operation_from_basic_bin(), find_symmetry_operation_from_basic_view_segment_numbers(), stir::SegmentIndices::segment_num(), and stir::ViewgramIndices::view_num().
Referenced by find_symmetry_operation_from_basic_bin(), and find_symmetry_operation_from_basic_view_segment_numbers().
|
overrideprotectedpure virtual |
Check equality.
Implements stir::DataSymmetriesForViewSegmentNumbers.
References blindly_equals(), stir::DataSymmetriesForViewSegmentNumbers::blindly_equals(), and proj_data_info_ptr.
Referenced by blindly_equals().