STIR 6.5.0

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

#include "stir/Bin.h"

Inheritance diagram for stir::Bin:

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
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

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'

Constructor & Destructor Documentation

◆ Bin() [1/4]

stir::Bin::Bin ( )
inline

default constructor (leaves most members uninitialised)

References Bin().

Referenced by Bin(), get_empty_copy(), stir::ProjMatrixElemsForOneDenselValue::operator+=(), operator==(), and stir::ProjMatrixElemsForOneDenselValue::operator==.

◆ Bin() [2/4]

stir::Bin::Bin ( int segment_num,
int view_num,
int axial_pos_num,
int tangential_pos_num,
float bin_value )
inline

◆ Bin() [3/4]

stir::Bin::Bin ( int segment_num,
int view_num,
int axial_pos_num,
int tangential_pos_num )
inline

◆ Bin() [4/4]

stir::Bin::Bin ( int segment_num,
int view_num,
int axial_pos_num,
int tangential_pos_num,
int timing_pos_num )
inline

Member Function Documentation

◆ axial_pos_num()

int stir::Bin::axial_pos_num ( ) const
inline

get axial position number

Referenced by stir::BackProjectorByBinUsingProjMatrixByBin::actual_back_project(), stir::BinNormalisation::apply(), stir::BinNormalisationSinogramRescaling::apply(), Bin(), Bin(), Bin(), stir::ProjMatrixElemsForOneDenselValue::coordinates_equal(), stir::ProjMatrixElemsForOneDenselValue::coordinates_less(), stir::LmToProjData::do_post_normalisation(), stir::DataSymmetriesForBins_PET_CartesianGrid::find_basic_bin(), stir::DataSymmetriesForBins_PET_CartesianGrid::find_symmetry_operation_from_basic_bin(), stir::ProjDataInfoCylindricalNoArcCorr::get_all_det_pos_pairs_for_bin(), stir::CListEventCylindricalScannerWithViewTangRingRingEncoding< CListEventECAT966 >::get_bin(), stir::ProjDataInfoCylindricalArcCorr::get_bin(), stir::ProjDataInfoCylindricalNoArcCorr::get_bin(), stir::BinNormalisationSinogramRescaling::get_bin_efficiency(), stir::LmToProjData::get_bin_from_event(), stir::LmToProjData::get_compression_count(), stir::ProjDataInfoCylindricalNoArcCorr::get_det_pair_for_bin(), get_empty_copy(), stir::ProjDataInfoCylindrical::get_m(), stir::ProjDataInfoCylindricalNoArcCorr::get_num_det_pos_pairs_for_bin(), stir::ProjDataFromStream::get_offset(), stir::TrivialDataSymmetriesForBins::get_related_bins(), stir::DataSymmetriesForBins_PET_CartesianGrid::get_related_bins_factorised(), stir::TrivialDataSymmetriesForBins::get_related_bins_factorised(), stir::ProjDataInfo::get_sampling_in_k(), stir::ProjDataInfo::get_sampling_in_m(), stir::ProjDataInfo::get_sampling_in_s(), stir::ProjDataInfo::get_sampling_in_t(), stir::get_scale_factors_per_sinogram(), stir::ProjDataFromStream::get_viewgram(), stir::ProjDataInMemory::get_viewgram(), stir::DataSymmetriesForBins_PET_CartesianGrid::num_related_bins(), stir::ProjMatrixElemsForOneDenselValue::operator<, stir::operator<<(), stir::LmToProjData::process_data(), stir::ScatterSimulation::process_data_for_view_segment_num(), stir::ProjDataInfoTests::run_Blocks_DOI_test(), stir::ProjDataInfoTests::run_coordinate_test(), stir::ProjDataInfoTests::run_coordinate_test_for_realistic_scanner(), stir::scale_sinograms(), stir::ProjDataFromStream::set_viewgram(), stir::ProjDataInMemory::set_viewgram(), stir::LmToProjDataBootstrap< LmToProjDataT >::start_new_time_frame(), stir::transform_3d_object(), stir::BinNormalisation::undo(), stir::BinNormalisationSinogramRescaling::undo(), and stir::ProjMatrixByBinFromFile::write_to_file().

◆ tangential_pos_num()

int stir::Bin::tangential_pos_num ( ) const
inline

get tangential position number

Referenced by stir::BackProjectorByBinUsingProjMatrixByBin::actual_back_project(), stir::BinNormalisation::apply(), stir::BinNormalisationSinogramRescaling::apply(), Bin(), Bin(), Bin(), stir::ProjMatrixByDenselOnCartesianGridUsingElement::calculate_proj_matrix_elems_for_one_densel(), stir::ProjMatrixElemsForOneDenselValue::coordinates_equal(), stir::ProjMatrixElemsForOneDenselValue::coordinates_less(), stir::LmToProjData::do_post_normalisation(), stir::DataSymmetriesForBins_PET_CartesianGrid::find_basic_bin(), stir::DataSymmetriesForBins_PET_CartesianGrid::find_symmetry_operation_from_basic_bin(), stir::ProjDataInfoCylindricalNoArcCorr::get_all_det_pos_pairs_for_bin(), stir::ProjDataInfoCylindricalArcCorr::get_bin(), stir::ProjDataInfoCylindricalNoArcCorr::get_bin(), stir::ProjDataInfoGenericNoArcCorr::get_bin(), stir::LmToProjData::get_bin_from_event(), stir::ProjDataInfoCylindricalNoArcCorr::get_det_pair_for_bin(), stir::ProjMatrixByDenselUsingRayTracing::get_element(), get_empty_copy(), stir::ProjDataFromStream::get_offset(), stir::TrivialDataSymmetriesForBins::get_related_bins(), stir::DataSymmetriesForBins_PET_CartesianGrid::get_related_bins_factorised(), stir::TrivialDataSymmetriesForBins::get_related_bins_factorised(), stir::ProjDataInfoCylindricalArcCorr::get_s(), stir::ProjDataInfoCylindricalNoArcCorr::get_s(), stir::ProjDataInfo::get_sampling_in_k(), stir::ProjDataInfo::get_sampling_in_m(), stir::ProjDataInfo::get_sampling_in_s(), stir::ProjDataInfo::get_sampling_in_t(), stir::DataSymmetriesForBins_PET_CartesianGrid::num_related_bins(), stir::ProjMatrixElemsForOneDenselValue::operator<, stir::operator<<(), stir::LmToProjData::process_data(), stir::ScatterSimulation::process_data_for_view_segment_num(), stir::ProjDataInfoTests::run_Blocks_DOI_test(), stir::ProjDataInfoTests::run_coordinate_test(), stir::ProjDataInfoTests::run_coordinate_test_for_realistic_scanner(), stir::LmToProjDataBootstrap< LmToProjDataT >::start_new_time_frame(), stir::transform_3d_object(), stir::BinNormalisation::undo(), stir::BinNormalisationSinogramRescaling::undo(), and stir::ProjMatrixByBinFromFile::write_to_file().

◆ time_frame_num()

int stir::Bin::time_frame_num ( ) const
inline

get time-frame number (1-based)

Referenced by stir::operator<<(), and stir::LmToProjData::process_data().

◆ get_empty_copy()

◆ get_bin_value()

◆ set_bin_value()

◆ 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.

◆ operator==()

bool stir::Bin::operator== ( const Bin & bin2) const
inline

comparison operators

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


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