STIR 6.5.0
stir::ProjMatrixElemsForOneDenselValue Class Reference

Stores voxel coordinates and the value of the matrix element. More...

#include "stir/recon_buildblock/ProjMatrixElemsForOneDenselValue.h"

Inheritance diagram for stir::ProjMatrixElemsForOneDenselValue:

Public Member Functions

 ProjMatrixElemsForOneDenselValue (const Bin &)
ProjMatrixElemsForOneDenselValue & operator+= (const ProjMatrixElemsForOneDenselValue &el2)
 Adds el2.get_value() to the value of the current object.
ProjMatrixElemsForOneDenselValue & operator*= (const float d)
 Multiplies the value of with a float.
ProjMatrixElemsForOneDenselValue & operator+= (const float d)
 Adds a float to the value.
ProjMatrixElemsForOneDenselValue & operator/= (const float d)
 Divides the value of with a float.
float get_value () const
void set_value (const float v)
Public Member Functions inherited from stir::Bin
 Bin ()
 default constructor (leaves most members uninitialised)
 Bin (int segment_num, int view_num, int axial_pos_num, int tangential_pos_num, float bin_value)
 constructs a bin with value (timing_pos defaulting to 0)
 Bin (int segment_num, int view_num, int axial_pos_num, int tangential_pos_num)
 constructs a bin with value (timing_pos and value defaulting to 0)
 Bin (int segment_num, int view_num, int axial_pos_num, int tangential_pos_num, int timing_pos_num, float bin_value)
 Bin (int segment_num, int view_num, int axial_pos_num, int tangential_pos_num, int timing_pos_num)
 constructs a bin with value (value defaulting to 0)
int axial_pos_num () const
 get axial position number
int tangential_pos_num () const
 get tangential position number
int time_frame_num () const
 get time-frame number (1-based)
int & axial_pos_num ()
int & tangential_pos_num ()
int & time_frame_num ()
Bin get_empty_copy () const
 get an empty copy
float get_bin_value () const
 get the value after forward projection
void set_bin_value (float v)
 set the value to be back projected
Bin & operator+= (const float dx)
 accumulate voxel's contribution during forward projection
Bin & operator*= (const float dx)
 multiply bin values
Bin & operator/= (const float dx)
 divide bin values
bool operator== (const Bin &) const
 comparison operators
bool operator!= (const Bin &) const
Public Member Functions inherited from stir::ViewgramIndices
 ViewgramIndices ()
 an empty constructor (sets everything to 0)
 ViewgramIndices (const int view_num, const int segment_num, const int timing_pos_num=0)
 constructor taking view and segment number as arguments
int view_num () const
 get view number for const objects
int & view_num ()
 get reference to view number
bool operator< (const ViewgramIndices &other) const
 comparison operator, only useful for sorting
bool operator== (const ViewgramIndices &other) const
 test for equality
bool operator!= (const ViewgramIndices &other) const
Public Member Functions inherited from stir::SegmentIndices
 SegmentIndices (const int segment_num=0, const int timing_pos_num=0)
 constructor segment number as arguments
int segment_num () const
 get segment number for const objects
int & segment_num ()
 get reference to segment number
int timing_pos_num () const
 get TOF index for const objects
int & timing_pos_num ()
 get reference to TOF index
bool operator< (const SegmentIndices &other) const
 comparison operator, only useful for sorting
bool operator== (const SegmentIndices &other) const
 test for equality
bool operator!= (const SegmentIndices &other) const

Static Public Member Functions

static bool coordinates_equal (const ProjMatrixElemsForOneDenselValue &el1, const ProjMatrixElemsForOneDenselValue &el2)
 Checks if the coordinates are equal.
static bool coordinates_less (const ProjMatrixElemsForOneDenselValue &el1, const ProjMatrixElemsForOneDenselValue &el2)
 Checks lexicographical order of the coordinates.

Friends

bool operator== (const ProjMatrixElemsForOneDenselValue &el1, const ProjMatrixElemsForOneDenselValue &el2)
 Checks coordinates and value are equal.
bool operator< (const ProjMatrixElemsForOneDenselValue &el1, const ProjMatrixElemsForOneDenselValue &el2)
 Checks lexicographical order of the coordinates and the value.

Detailed Description

Stores voxel coordinates and the value of the matrix element.

(Probably) only useful in class ProjMatrixElemsForOneDensel.

Warning
It is recommended never to use this class name directly, but always use the typedef ProjMatrixElemsForOneDensel::value_type.
Todo
Simply derived from Bin for now.

Member Function Documentation

◆ operator+=() [1/2]

ProjMatrixElemsForOneDenselValue & stir::ProjMatrixElemsForOneDenselValue::operator+= ( const ProjMatrixElemsForOneDenselValue & el2)
inline

Adds el2.get_value() to the value of the current object.

References stir::Bin::get_bin_value(), operator+=(), and stir::Bin::set_bin_value().

Referenced by operator+=(), and operator+=().

◆ operator*=()

ProjMatrixElemsForOneDenselValue & stir::ProjMatrixElemsForOneDenselValue::operator*= ( const float d)
inline

Multiplies the value of with a float.

References stir::Bin::get_bin_value(), operator*=(), and stir::Bin::set_bin_value().

Referenced by operator*=().

◆ operator+=() [2/2]

ProjMatrixElemsForOneDenselValue & stir::ProjMatrixElemsForOneDenselValue::operator+= ( const float d)
inline

Adds a float to the value.

References stir::Bin::Bin(), and operator+=().

◆ operator/=()

ProjMatrixElemsForOneDenselValue & stir::ProjMatrixElemsForOneDenselValue::operator/= ( const float d)
inline

Divides the value of with a float.

References stir::Bin::get_bin_value(), operator/=(), and stir::Bin::set_bin_value().

Referenced by operator/=().

◆ coordinates_equal()

bool stir::ProjMatrixElemsForOneDenselValue::coordinates_equal ( const ProjMatrixElemsForOneDenselValue & el1,
const ProjMatrixElemsForOneDenselValue & el2 )
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 function objects) to std::sort.

References stir::Bin::axial_pos_num(), coordinates_equal(), stir::SegmentIndices::segment_num(), stir::Bin::tangential_pos_num(), and stir::ViewgramIndices::view_num().

Referenced by stir::ProjMatrixElemsForOneDensel::check_state(), coordinates_equal(), and stir::ProjMatrixElemsForOneDensel::merge().

◆ coordinates_less()

bool stir::ProjMatrixElemsForOneDenselValue::coordinates_less ( const ProjMatrixElemsForOneDenselValue & el1,
const ProjMatrixElemsForOneDenselValue & el2 )
inlinestatic

◆ operator==

bool operator== ( const ProjMatrixElemsForOneDenselValue & el1,
const ProjMatrixElemsForOneDenselValue & el2 )
friend

Checks coordinates and value are equal.

References stir::Bin::Bin(), and operator==.

Referenced by operator==.

◆ operator<

bool operator< ( const ProjMatrixElemsForOneDenselValue & el1,
const ProjMatrixElemsForOneDenselValue & el2 )
friend

The documentation for this class was generated from the following files: