STIR
6.2.0
|
Stores voxel coordinates and the value of the matrix element. More...
#include "stir/recon_buildblock/ProjMatrixElemsForOneBinValue.h"
Public Member Functions | |
ProjMatrixElemsForOneBinValue (const BasicCoordinate< 3, int > &coords, const float ivalue=0) | |
BasicCoordinate< 3, int > | get_coords () const |
get the coordinates | |
int | coord1 () const |
In effect the same as get_coords()[1] (but faster) | |
int | coord2 () const |
In effect the same as get_coords()[2] (but faster) | |
int | coord3 () const |
In effect the same as get_coords()[3] (but faster) | |
float | get_value () const |
Get the value of the matrix element. | |
ProjMatrixElemsForOneBinValue & | operator+= (const ProjMatrixElemsForOneBinValue &el2) |
Adds el2.get_value() to the value of the current object. | |
ProjMatrixElemsForOneBinValue & | operator*= (const float d) |
Multiplies the value of with a float. | |
ProjMatrixElemsForOneBinValue & | operator+= (const float d) |
Adds a float to the value. | |
ProjMatrixElemsForOneBinValue & | operator/= (const float d) |
Divides the value of with a float. | |
Static Public Member Functions | |
static bool | coordinates_equal (const ProjMatrixElemsForOneBinValue &el1, const ProjMatrixElemsForOneBinValue &el2) |
Checks if the coordinates are equal. More... | |
static bool | coordinates_less (const ProjMatrixElemsForOneBinValue &el1, const ProjMatrixElemsForOneBinValue &el2) |
Checks lexicographical order of the coordinates. | |
Friends | |
bool | operator== (const ProjMatrixElemsForOneBinValue &el1, const ProjMatrixElemsForOneBinValue &el2) |
Checks coordinates and value are equal. | |
bool | operator< (const ProjMatrixElemsForOneBinValue &el1, const ProjMatrixElemsForOneBinValue &el2) |
Checks lexicographical order of the coordinates and the value. | |
Stores voxel coordinates and the value of the matrix element.
(Probably) only useful in class ProjMatrixElemsForOneBin.
|
inlinestatic |
Checks if the coordinates are equal.
This function and the next one below are implemented as static members, such that you can pass them (as functoon objects) to std::sort.
Referenced by stir::ProjMatrixElemsForOneBin::check_state(), and stir::ProjMatrixElemsForOneBin::merge().