STIR
6.2.0
|
A class for storing viewgrams which are related by symmetry. More...
#include "stir/RelatedViewgrams.h"
Public Types | |
typedefs for iterator support | |
typedef std::random_access_iterator_tag | iterator_category |
typedef Viewgram< elemT > | value_type |
typedef value_type & | reference |
typedef const value_type & | const_reference |
typedef std::ptrdiff_t | difference_type |
typedef std::size_t | size_type |
typedef std::vector< Viewgram< elemT > >::iterator | iterator |
typedef std::vector< Viewgram< elemT > >::const_iterator | const_iterator |
Public Member Functions | |
RelatedViewgrams () | |
default constructor (sets everything empty) | |
RelatedViewgrams (const std::vector< Viewgram< elemT >> &viewgrams, const shared_ptr< DataSymmetriesForViewSegmentNumbers > &symmetries_used) | |
a private constructor which simply sets the members More... | |
int | get_basic_view_num () const |
get 'basic' view_num More... | |
int | get_basic_segment_num () const |
get 'basic' segment_num More... | |
int | get_basic_timing_pos_num () const |
get 'basic' timing_pos_num More... | |
ViewgramIndices | get_basic_view_segment_num () const |
get 'basic' view_segment_num More... | |
ViewgramIndices | get_basic_viewgram_indices () const |
get 'basic' viewgram indices More... | |
int | get_num_viewgrams () const |
returns the number of viewgrams in this object | |
int | get_num_axial_poss () const |
int | get_num_tangential_poss () const |
int | get_min_axial_pos_num () const |
int | get_max_axial_pos_num () const |
int | get_min_tangential_pos_num () const |
int | get_max_tangential_pos_num () const |
shared_ptr< const ProjDataInfo > | get_proj_data_info_sptr () const |
Get shared pointer to proj data info. | |
const DataSymmetriesForViewSegmentNumbers * | get_symmetries_ptr () const |
Get a pointer to the symmetries used in constructing this object. | |
shared_ptr< DataSymmetriesForViewSegmentNumbers > | get_symmetries_sptr () const |
Get a shared pointer to the symmetries used in constructing this object. More... | |
void | grow (const IndexRange< 2 > &range) |
Grow each viewgram. More... | |
iterator | begin () |
use to initialise an iterator to the first element of the vector | |
iterator | end () |
iterator 'past' the last element of the vector | |
const_iterator | begin () const |
use to initialise an iterator to the first element of the (const) vector | |
const_iterator | end () const |
iterator 'past' the last element of the (const) vector | |
RelatedViewgrams & | operator*= (const elemT) |
Multiplication of all data elements with a constant. More... | |
RelatedViewgrams & | operator/= (const elemT) |
Division of all data elements by a constant. More... | |
RelatedViewgrams & | operator+= (const elemT) |
Addition of all data elements by a constant. More... | |
RelatedViewgrams & | operator-= (const elemT) |
Subtraction of all data elements by a constant. More... | |
RelatedViewgrams & | operator*= (const RelatedViewgrams< elemT > &) |
Element-wise multiplication with another RelatedViewgram object. More... | |
RelatedViewgrams & | operator/= (const RelatedViewgrams< elemT > &) |
Element-wise division by another RelatedViewgram object. More... | |
RelatedViewgrams & | operator+= (const RelatedViewgrams< elemT > &) |
Element-wise addition by another RelatedViewgram object. More... | |
RelatedViewgrams & | operator-= (const RelatedViewgrams< elemT > &) |
Element-wise subtraction by another RelatedViewgram object. More... | |
elemT | find_max () const |
Find the maximum of all data elements. | |
elemT | find_min () const |
Find the maximum of all data elements. | |
void | fill (const elemT &n) |
Set all data elements to n. | |
RelatedViewgrams | get_empty_copy () const |
Return a new object with ProjDataInfo etc., but all data elements set to 0. | |
Equality | |
bool | has_same_characteristics (self_type const &, std::string &explanation) const |
Checks if the 2 objects have the proj_data_info, segment_num etc. More... | |
bool | has_same_characteristics (self_type const &) const |
Checks if the 2 objects have the proj_data_info, segment_num etc. More... | |
bool | operator== (const self_type &) const |
check equality (data has to be identical) More... | |
bool | operator!= (const self_type &) const |
negation of operator== | |
Friends | |
class | ProjData |
class | ProjDataInfo |
A class for storing viewgrams which are related by symmetry.
|
inline |
a private constructor which simply sets the members
|
inline |
get 'basic' view_num
see DataSymmetriesForViewSegmentNumbers for definition of 'basic'
Referenced by stir::BackProjectorByBinUsingProjMatrixByBin::actual_back_project(), stir::ForwardProjectorByBinUsingProjMatrixByBin::get_symmetries_used(), stir::ForwardProjectorByBinUsingRayTracing::get_symmetries_used(), stir::RelatedViewgrams< float >::has_same_characteristics(), and stir::BackProjectorByBinUsingInterpolation::use_piecewise_linear_interpolation().
|
inline |
get 'basic' segment_num
see DataSymmetriesForViewSegmentNumbers for definition of 'basic'
Referenced by stir::BackProjectorByBinUsingProjMatrixByBin::actual_back_project(), stir::BackProjectorByBinParallelproj::actual_back_project(), stir::ForwardProjectorByBinUsingProjMatrixByBin::get_symmetries_used(), stir::ForwardProjectorByBinParallelproj::get_symmetries_used(), stir::ForwardProjectorByBinUsingRayTracing::get_symmetries_used(), stir::RelatedViewgrams< float >::has_same_characteristics(), and stir::BackProjectorByBinUsingInterpolation::use_piecewise_linear_interpolation().
|
inline |
get 'basic' timing_pos_num
see DataSymmetriesForViewSegmentNumbers for definition of 'basic'
Referenced by stir::BackProjectorByBinUsingProjMatrixByBin::actual_back_project(), stir::BinNormalisationFromProjData::apply(), stir::ArcCorrection::do_arc_correction(), stir::ForwardProjectorByBinUsingProjMatrixByBin::get_symmetries_used(), stir::ForwardProjectorByBinParallelproj::get_symmetries_used(), stir::RelatedViewgrams< float >::has_same_characteristics(), stir::BinNormalisationFromProjData::undo(), and stir::zoom_viewgrams().
|
inline |
get 'basic' view_segment_num
Referenced by stir::ForwardProjectorByBinNiftyPET::actual_forward_project(), stir::BinNormalisationFromML2D::apply(), stir::BinNormalisationFromProjData::apply(), stir::BinNormalisationPETFromComponents::apply(), stir::BackProjectorByBin::back_project(), stir::ArcCorrection::do_arc_correction(), stir::ForwardProjectorByBin::forward_project(), stir::ForwardProjectorByBinParallelproj::get_symmetries_used(), stir::BinNormalisationFromML2D::undo(), stir::BinNormalisationFromProjData::undo(), stir::BinNormalisationPETFromComponents::undo(), and stir::zoom_viewgrams().
|
inline |
get 'basic' viewgram indices
see DataSymmetriesForViewSegmentNumbers for definition of 'basic'
|
inline |
Get a shared pointer to the symmetries used in constructing this object.
Referenced by stir::ArcCorrection::do_arc_correction().
void RelatedViewgrams< elemT >::grow | ( | const IndexRange< 2 > & | range | ) |
Grow each viewgram.
This function is necessary because it modifies the size of each viewgram sequentially. This is not allowed by an external function, and leads to different proj_data_info_ptrs anyway. So, it would be caught by an assert at some point.
Referenced by stir::FBP3DRPReconstruction::do_grow3D_viewgram().
RelatedViewgrams< elemT > & RelatedViewgrams< elemT >::operator*= | ( | const elemT | f | ) |
Multiplication of all data elements with a constant.
RelatedViewgrams< elemT > & RelatedViewgrams< elemT >::operator/= | ( | const elemT | f | ) |
Division of all data elements by a constant.
RelatedViewgrams< elemT > & RelatedViewgrams< elemT >::operator+= | ( | const elemT | f | ) |
Addition of all data elements by a constant.
RelatedViewgrams< elemT > & RelatedViewgrams< elemT >::operator-= | ( | const elemT | f | ) |
Subtraction of all data elements by a constant.
RelatedViewgrams< elemT > & RelatedViewgrams< elemT >::operator*= | ( | const RelatedViewgrams< elemT > & | arg | ) |
Element-wise multiplication with another RelatedViewgram object.
RelatedViewgrams< elemT > & RelatedViewgrams< elemT >::operator/= | ( | const RelatedViewgrams< elemT > & | arg | ) |
Element-wise division by another RelatedViewgram object.
RelatedViewgrams< elemT > & RelatedViewgrams< elemT >::operator+= | ( | const RelatedViewgrams< elemT > & | arg | ) |
Element-wise addition by another RelatedViewgram object.
RelatedViewgrams< elemT > & RelatedViewgrams< elemT >::operator-= | ( | const RelatedViewgrams< elemT > & | arg | ) |
Element-wise subtraction by another RelatedViewgram object.
bool RelatedViewgrams< elemT >::has_same_characteristics | ( | self_type const & | other, |
std::string & | explanation | ||
) | const |
Checks if the 2 objects have the proj_data_info, segment_num etc.
If they do not
have the same characteristics, the string explanation explains why.
bool RelatedViewgrams< elemT >::has_same_characteristics | ( | self_type const & | other | ) | const |
Checks if the 2 objects have the proj_data_info, segment_num etc.
Use this version if you do not need to know why they do not match.
bool RelatedViewgrams< elemT >::operator== | ( | const self_type & | that | ) | const |
check equality (data has to be identical)
Uses has_same_characteristics() and Array::operator==.
==
, which might not be what you need to check when elemT
has data with float or double numbers.