4#ifndef __stir_recon_buildblock_ProjMatrixElemsForOneDensel__
5#define __stir_recon_buildblock_ProjMatrixElemsForOneDensel__
33template <
int num_dimensions,
typename elemT>
34class DiscretisedDensity;
73 typedef std::vector<value_type> Element_vector;
78 typedef Element_vector::const_iterator const_iterator;
79 typedef Element_vector::size_type size_type;
80 typedef Element_vector::difference_type difference_type;
81 typedef std::random_access_iterator_tag iterator_category;
109 inline const_iterator
begin()
const;
111 inline const_iterator end()
const;
126 void reserve(size_type max_number);
128 inline size_type
size()
const;
148 void write(fstream&fst)
const;
149 void read(fstream&fst );
165 void forward_project(
Densel&,
177 std::vector<value_type> elements;
Declaration of typedef stir::Densel.
Declaration of class stir::ProjMatrixElemsForOneDenselValue.
Inline implementations for class stir::ProjMatrixElemsForOneDensel.
This abstract class is the basis for all image representations.
Definition DiscretisedDensity.h:99
Stores voxel coordinates and the value of the matrix element.
Definition ProjMatrixElemsForOneDenselValue.h:42
ProjMatrixElemsForOneDensel()
constructor
Definition ProjMatrixElemsForOneDensel.cxx:38
void erase()
reset lor to 0 length
Definition ProjMatrixElemsForOneDensel.cxx:50
void reserve(size_type max_number)
reserve enough space for max_number elements (but don't fill them in)
Definition ProjMatrixElemsForOneDensel.cxx:44
ProjMatrixElemsForOneDensel & operator/=(const float d)
Divides all values with a constant.
Definition ProjMatrixElemsForOneDensel.cxx:72
void push_back(const value_type &)
add a new value_type object at the end
Definition ProjMatrixElemsForOneDensel.inl:38
void sort()
Sort the elements on coordinates of the voxels.
Definition ProjMatrixElemsForOneDensel.cxx:115
size_type size() const
number of non-zero elements
Definition ProjMatrixElemsForOneDensel.inl:44
Succeeded check_state() const
check if each voxel occurs only once
Definition ProjMatrixElemsForOneDensel.cxx:89
Element_vector::iterator iterator
typedefs for iterator support
Definition ProjMatrixElemsForOneDensel.h:77
iterator begin()
functions for allowing iterator access
Definition ProjMatrixElemsForOneDensel.inl:50
ProjMatrixElemsForOneDenselValue value_type
Recommended way to call the type of the elements, instead of referring to the actual classname.
Definition ProjMatrixElemsForOneDensel.h:69
ProjMatrixElemsForOneDensel & operator*=(const float d)
Multiplies all values with a constant.
Definition ProjMatrixElemsForOneDensel.cxx:56
void set_densel(const Densel &)
and set the Densel coordinates
Definition ProjMatrixElemsForOneDensel.inl:32
void merge(ProjMatrixElemsForOneDensel &lor)
merge 2nd lor into current object
Definition ProjMatrixElemsForOneDensel.cxx:136
float square_sum() const
Return sum of squares of all values.
Definition ProjMatrixElemsForOneDensel.cxx:121
const Densel & get_densel() const
get the Densel coordinates corresponding to this row
Definition ProjMatrixElemsForOneDensel.inl:26
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44
Coordinate3D< int > Densel
a typedef used for an element of a DiscretisedDensity
Definition Densel.h:36