STIR  6.2.0
Public Member Functions | Static Public Member Functions | Friends | List of all members
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:
Inheritance graph
[legend]

Public Member Functions

 ProjMatrixElemsForOneDenselValue (const Bin &)
 
ProjMatrixElemsForOneDenselValueoperator+= (const ProjMatrixElemsForOneDenselValue &el2)
 Adds el2.get_value() to the value of the current object.
 
ProjMatrixElemsForOneDenselValueoperator*= (const float d)
 Multiplies the value of with a float.
 
ProjMatrixElemsForOneDenselValueoperator+= (const float d)
 Adds a float to the value.
 
ProjMatrixElemsForOneDenselValueoperator/= (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
 
Binoperator+= (const float dx)
 accumulate voxel's contribution during forward projection
 
Binoperator*= (const float dx)
 multiply bin values
 
Binoperator/= (const float dx)
 divide bin values More...
 
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 More...
 
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 More...
 
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. More...
 
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

◆ 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(), stir::SegmentIndices::segment_num(), stir::Bin::tangential_pos_num(), and stir::ViewgramIndices::view_num().

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


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