|
STIR 6.5.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. | |
| typedef Element_vector::iterator | iterator |
| typedefs for iterator support | |
| typedef Element_vector::const_iterator | const_iterator |
| typedef Element_vector::reverse_iterator | reverse_iterator |
| typedef Element_vector::const_reverse_iterator | const_reverse_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 | |
| 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 |
| reverse_iterator | rbegin () |
| const_reverse_iterator | rbegin () const |
| reverse_iterator | rend () |
| const_reverse_iterator | rend () 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 | |
| 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. | |
| void | merge (ProjMatrixElemsForOneBin &lor) |
| merge 2nd lor into current object | |
| bool | operator== (const ProjMatrixElemsForOneBin &) const |
| Compare 2 lors to see if they are equal. | |
| bool | operator!= (const ProjMatrixElemsForOneBin &) const |
| Compare 2 lors. | |
| float | square_sum () const |
| Return sum of squares of all values. | |
| 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) |
References ProjMatrixElemsForOneBin().
Referenced by back_project(), check_state(), forward_project(), merge(), operator!=(), operator==(), and ProjMatrixElemsForOneBin().
| Succeeded stir::ProjMatrixElemsForOneBin::check_state | ( | ) | const |
check if each voxel occurs only once
References begin(), stir::ProjMatrixElemsForOneBinValue::coordinates_equal(), ProjMatrixElemsForOneBin(), size(), sort(), and stir::warning().
Referenced by stir::ProjMatrixByBin::get_proj_matrix_elems_for_one_bin(), and merge().
|
inline |
get the bin coordinates corresponding to this row
References get_bin().
Referenced by stir::ProjMatrixByBin::cache_proj_matrix_elems_for_one_bin(), get_bin(), and stir::ProjMatrixByBin::get_cached_proj_matrix_elems_for_one_bin().
|
inline |
and set the bin coordinates
References set_bin().
Referenced by stir::ProjMatrixByBin::get_proj_matrix_elems_for_one_bin(), and set_bin().
|
inline |
functions for allowing iterator access
References begin().
Referenced by stir::BackProjectorByBinUsingSquareProjMatrixByBin::actual_back_project(), back_project(), begin(), check_state(), forward_project(), merge(), operator*=(), operator/=(), operator==(), sort(), and square_sum().
| void stir::ProjMatrixElemsForOneBin::erase | ( | ) |
reset lor to 0 length
Referenced by erase(), stir::ProjMatrixByBin::get_proj_matrix_elems_for_one_bin(), and merge().
|
inline |
remove a single value_type
References erase().
|
inline |
add a new value_type object at the end
References push_back().
Referenced by merge(), push_back(), and stir::RayTraceVoxelsOnCartesianGrid().
| void stir::ProjMatrixElemsForOneBin::reserve | ( | size_type | max_number | ) |
reserve enough space for max_number elements (but don't fill them in)
Referenced by stir::RayTraceVoxelsOnCartesianGrid().
|
inline |
number of non-zero elements
References size().
Referenced by check_state(), merge(), stir::RayTraceVoxelsOnCartesianGrid(), and size().
| ProjMatrixElemsForOneBin & stir::ProjMatrixElemsForOneBin::operator*= | ( | const float | d | ) |
Multiplies all values with a constant.
References begin().
| ProjMatrixElemsForOneBin & stir::ProjMatrixElemsForOneBin::operator/= | ( | const float | d | ) |
Divides all values with a constant.
References begin().
| 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(), merge(), and stir::RayTraceVoxelsOnCartesianGrid().
| 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(), ProjMatrixElemsForOneBin(), push_back(), size(), and sort().
| bool stir::ProjMatrixElemsForOneBin::operator== | ( | const ProjMatrixElemsForOneBin & | lor | ) | const |
Compare 2 lors to see if they are equal.
References begin(), and ProjMatrixElemsForOneBin().
| bool stir::ProjMatrixElemsForOneBin::operator!= | ( | const ProjMatrixElemsForOneBin & | lor | ) | const |
Compare 2 lors.
References ProjMatrixElemsForOneBin().
| float stir::ProjMatrixElemsForOneBin::square_sum | ( | ) | const |
Return sum of squares of all values.
References begin(), and stir::square().
| void stir::ProjMatrixElemsForOneBin::back_project | ( | DiscretisedDensity< 3, float > & | density, |
| const Bin & | single ) const |
back project a single bin (accumulates)
References begin(), stir::Bin::get_bin_value(), stir::VectorWithOffset< T >::get_max_index(), and stir::VectorWithOffset< T >::get_min_index().
Referenced by stir::BackProjectorByBinUsingProjMatrixByBin::actual_back_project(), stir::BackProjectorByBinUsingSquareProjMatrixByBin::actual_back_project(), and back_project().
| void stir::ProjMatrixElemsForOneBin::forward_project | ( | Bin & | single, |
| const DiscretisedDensity< 3, float > & | density ) const |
forward project into a single bin (accumulates)
References begin(), stir::VectorWithOffset< T >::get_max_index(), and stir::VectorWithOffset< T >::get_min_index().
Referenced by forward_project().
| void stir::ProjMatrixElemsForOneBin::back_project | ( | DiscretisedDensity< 3, float > & | density, |
| const RelatedBins & | r_bins ) const |
back project related bins (accumulates)
References back_project(), stir::RelatedBins::begin(), stir::RelatedBins::end(), stir::DataSymmetriesForBins::find_symmetry_operation_from_basic_bin(), stir::Bin::get_bin_value(), stir::RelatedBins::get_symmetries_ptr(), and ProjMatrixElemsForOneBin().
| void stir::ProjMatrixElemsForOneBin::forward_project | ( | RelatedBins & | r_bins, |
| const DiscretisedDensity< 3, float > & | density ) const |
forward project related bins (accumulates)
References stir::RelatedBins::begin(), stir::RelatedBins::end(), stir::DataSymmetriesForBins::find_symmetry_operation_from_basic_bin(), forward_project(), stir::RelatedBins::get_symmetries_ptr(), and ProjMatrixElemsForOneBin().