STIR
6.2.0
|
Encodes symmetry operation on image coordinates and projection data coordinates. More...
#include "stir/recon_buildblock/SymmetryOperation.h"
Public Member Functions | |
virtual bool | is_trivial () const |
virtual void | transform_bin_coordinates (Bin &) const =0 |
virtual void | transform_view_segment_indices (ViewSegmentNumbers &) const =0 |
virtual void | transform_image_coordinates (BasicCoordinate< 3, int > &) const =0 |
virtual void | transform_proj_matrix_elems_for_one_bin (ProjMatrixElemsForOneBin &lor) const |
virtual void | transform_proj_matrix_elems_for_one_densel (ProjMatrixElemsForOneDensel &) const |
Encodes symmetry operation on image coordinates and projection data coordinates.
This class is mainly (only?) useful for ProjMatrix classes and their 'users'. Together with DataSymmetriesForBins, it provides the basic way to be able to write generic code without knowing which particular symmetries the data have.
Ideally, there would be no reference here to ProjMatrixElemsForOneBin, but we have to do this for efficiency. Overriding the virtual function will allow the compiler to inline the symmetry operations, resulting in a dramatic speed-up.
Price to pay (aside from some tedious repetition in the derived classes): the need for a SymmetryOperation::transform_proj_matrix_elems_for_one_bin member, and hence knowledge of the ProjMatrixElemsForOneBin class (This is the reason why the DataSymmetriesForBins* and SymmetryOperation* classes are in recon_buildblock.)
See recon_buildblock/SymmetryOperations_PET_CartesianGrid.cxx for some more info.