STIR  6.2.0
Public Member Functions | List of all members

A class for storing coordinates and value of a single projection bin. More...

#include "stir/Bin.h"

Inheritance diagram for stir::Bin:
Inheritance graph
[legend]

Public Member Functions

 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
 

Detailed Description

A class for storing coordinates and value of a single projection bin.

The timing position reflects the detection time difference between the two events for TOF. It is an "index" into the projection data like the other values.

The time_frame member defaults to 1 and needs to be set explicitly, e.g. when handling list mode data.

Warning
N.E: Constructors with default values were removed. I faced many problems with ambguity. I had to make changes to all the framework, when one set a float value, it has to be as 'x.f'

Member Function Documentation

◆ operator/=()

Bin & stir::Bin::operator/= ( const float  dx)
inline

divide bin values

Todo:
It is zero division proof in a similar way to divide<,,>(), though I am not sure if it should be.

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