STIR
6.2.0
|
This stores the non-zero projection matrix elements for every 'densel' that contributes to a given bin. More...
#include "stir/recon_buildblock/ProjMatrixElemsForOneBin.h"
Public Types | |
typedef ProjMatrixElemsForOneBinValue | value_type |
Recommended way to call the type of the elements, instead of referring to the actual classname. More... | |
typedef Element_vector::iterator | iterator |
typedefs for iterator support | |
typedef Element_vector::const_iterator | const_iterator |
typedef Element_vector::size_type | size_type |
typedef Element_vector::difference_type | difference_type |
typedef std::random_access_iterator_tag | iterator_category |
typedef value_type & | reference |
typedef const value_type & | const_reference |
Public Member Functions | |
ProjMatrixElemsForOneBin (const Bin &bin=Bin(), const int default_capacity=0) | |
constructor More... | |
Succeeded | check_state () const |
check if each voxel occurs only once | |
const Bin & | get_bin () const |
get the bin coordinates corresponding to this row | |
void | set_bin (const Bin &) |
and set the bin coordinates | |
iterator | begin () |
functions for allowing iterator access | |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
void | erase () |
reset lor to 0 length | |
iterator | erase (iterator it) |
remove a single value_type | |
void | push_back (const value_type &) |
add a new value_type object at the end More... | |
void | reserve (size_type max_number) |
reserve enough space for max_number elements (but don't fill them in) | |
size_type | size () const |
number of non-zero elements | |
size_type | capacity () const |
number of allocated elements | |
ProjMatrixElemsForOneBin & | operator*= (const float d) |
Multiplies all values with a constant. | |
ProjMatrixElemsForOneBin & | operator/= (const float d) |
Divides all values with a constant. | |
void | sort () |
Sort the elements on coordinates of the voxels. More... | |
void | merge (ProjMatrixElemsForOneBin &lor) |
merge 2nd lor into current object More... | |
bool | operator== (const ProjMatrixElemsForOneBin &) const |
Compare 2 lors to see if they are equal. More... | |
bool | operator!= (const ProjMatrixElemsForOneBin &) const |
Compare 2 lors. | |
float | square_sum () const |
Return sum of squares of all values. More... | |
void | back_project (DiscretisedDensity< 3, float > &, const Bin &) const |
back project a single bin (accumulates) | |
void | forward_project (Bin &, const DiscretisedDensity< 3, float > &) const |
forward project into a single bin (accumulates) | |
void | back_project (DiscretisedDensity< 3, float > &, const RelatedBins &) const |
back project related bins (accumulates) | |
void | forward_project (RelatedBins &, const DiscretisedDensity< 3, float > &) const |
forward project related bins (accumulates) | |
This stores the non-zero projection matrix elements for every 'densel' that contributes to a given bin.
In the usual terminology, this class implements a Line (or Tube) of Response (LOR, or TOR).
Recommended way to call the type of the elements, instead of referring to the actual classname.
Think about this name as 'the type of the value of a ProjMatrixElemsForOneBin::iterator *'.
This typedef is also required for 'standard' iterators.
|
explicit |
constructor
bin | effectively calls set_bin(bin) |
default_capacity | effectively calls reserve(default_capacity) |
|
inline |
add a new value_type object at the end
Referenced by merge(), stir::ProjMatrixByBinSinglePhoton::set_up(), stir::ProjMatrixByBinPinholeSPECTUB::~ProjMatrixByBinPinholeSPECTUB(), and stir::ProjMatrixByBinSPECTUB::~ProjMatrixByBinSPECTUB().
void stir::ProjMatrixElemsForOneBin::sort | ( | ) |
Sort the elements on coordinates of the voxels.
Uses value_type::coordinates_less as ordering function.
References begin(), and stir::ProjMatrixElemsForOneBinValue::coordinates_less().
Referenced by check_state(), and merge().
void stir::ProjMatrixElemsForOneBin::merge | ( | ProjMatrixElemsForOneBin & | lor | ) |
merge 2nd lor into current object
This makes sure that in the result, no duplicate coordinates occur.
lor
. References begin(), check_state(), stir::ProjMatrixElemsForOneBinValue::coordinates_equal(), stir::ProjMatrixElemsForOneBinValue::coordinates_less(), erase(), push_back(), size(), and sort().
bool stir::ProjMatrixElemsForOneBin::operator== | ( | const ProjMatrixElemsForOneBin & | lor | ) | const |
Compare 2 lors to see if they are equal.
References begin().
float stir::ProjMatrixElemsForOneBin::square_sum | ( | ) | const |
Return sum of squares of all values.
References begin(), and stir::square().