STIR 6.5.0
Items related to projection data
Collaboration diagram for Items related to projection data:

Topics

 Items related to Line Of Responses (preliminary)

Files

file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/ArcCorrection.cxx
 Implementation of class stir::ArcCorrection.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/DataSymmetriesForViewSegmentNumbers.cxx
 Implementations for class stir::DataSymmetriesForViewSegmentNumbers.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/DataWithProjDataInfo.cxx
 implementation of stir::DataWithProjDataInfo
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/extend_projdata.cxx
 Implementation of functions to extension of direct sinograms in view direction.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/GeometryBlocksOnCylindrical.cxx
 Non-inline implementations of stir::GeometryBlocksOnCylindrical.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/interpolate_projdata.cxx
 Perform B-Splines Interpolation of sinograms.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/inverse_SSRB.cxx
 Implementation of stir::inverse_SSRB.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/multiply_crystal_factors.cxx
 Implementation of stir::multiply_crystal_factors.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/ProjData.cxx
 Implementations for non-inline functions of class stir::ProjData.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/ProjDataFromStream.cxx
 Implementations for non-inline functions of class stir::ProjDataFromStream.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/ProjDataGEHDF5.cxx
 Implementations for class stir::GE::RDF_HDF5::ProjDataGEHDF5.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/ProjDataInfo.cxx
 Implementation of non-inline functions of class stir::ProjDataInfo.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/ProjDataInfoBlocksOnCylindricalNoArcCorr.cxx
 Non-inline implementations of stir::ProjDataInfoBlocksOnCylindricalNoArcCorr.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/ProjDataInfoCylindrical.cxx
 Non-inline implementations of stir::ProjDataInfoCylindrical.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/ProjDataInfoCylindricalArcCorr.cxx
 Implementation of non-inline functions of class stir::ProjDataInfoCylindricalArcCorr.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/ProjDataInfoCylindricalNoArcCorr.cxx
 Implementation of non-inline functions of class stir::ProjDataInfoCylindricalNoArcCorr.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/ProjDataInfoGenericNoArcCorr.cxx
 Implementation of non-inline functions of class stir::ProjDataInfoGenericNoArcCorr.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/ProjDataInfoSubsetByView.cxx
 Implementation of non-inline functions of class stir::ProjDataInfoSubsetByView.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/ProjDataInMemory.cxx
 Implementations for non-inline functions of class stir::ProjDataInMemory.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/ProjDataInterfile.cxx
 Implementation of class stir::ProjDataInterfile.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/scale_sinograms.cxx
 Implementations of functions defined in scale_sinogram.h.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/Segment.cxx
 Implementations for non-inline functions of class stir::Segment.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/SegmentBySinogram.cxx
 Implementations for non-inline functions of class stir::SegmentBySinogram.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/SegmentByView.cxx
 Implementations for non-inline functions of class stir::SegmentByView.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/Sinogram.cxx
 Implementations for non-inline functions of class stir::Sinogram.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/SSRB.cxx
 Implementation of stir::SSRB.
file  /home/kris/devel/STIRdistrib/STIR/src/buildblock/Viewgram.cxx
 Implementations for non-inline functions of class stir::Viewgram.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ArcCorrection.h
 Declaration of class stir::ArcCorrection.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/Bin.h
 Declaration of class stir::Bin.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/Bin.inl
 Implementations of inline functions of class stir::Bin.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/DataSymmetriesForViewSegmentNumbers.h
 Declaration of class stir::DataSymmetriesForViewSegmentNumbers.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/DataWithProjDataInfo.h
 declaration of stir::DataWithProjDataInfo
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/DataWithProjDataInfo.inl
 inline implementations of stir::DataWithProjDataInfo
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/DetectionPosition.h
 Declaration of class stir::DetectionPosition.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/DetectionPosition.inl
 Implementation of inline methods of class stir::DetectionPosition.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/DetectionPositionPair.h
 Declaration of class stir::DetectionPositionPair.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/DetectionPositionPair.inl
 Implementation of inline methods of class stir::DetectionPositionPair.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/GeometryBlocksOnCylindrical.h
 Declaration of class stir::GeometryBlocksOnCylindrical.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/multiply_crystal_factors.h
 Declaration of stir::multiply_crystal_factors.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjData.h
 Declaration of class stir::ProjData.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjData.inl
 Implementations for inline functions of class stir::ProjData.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataFromStream.h
 Declaration of class stir::ProjDataFromStream.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataFromStream.inl
 Inline implementations for class stir::ProjDataFromStream.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataGEHDF5.h
 Declaration of class stir::GE::RDF_HDF5::ProjDataFromGEHDF5.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataInfo.h
 Declaration of class stir::ProjDataInfo.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataInfo.inl
 Implementations of inline functions for class stir::ProjDataInfo.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataInfoBlocksOnCylindrical.h
 Declaration of class stir::ProjDataInfoBlocksOnCylindrical.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataInfoBlocksOnCylindricalNoArcCorr.h
 Declaration of class stir::ProjDataInfoBlocksOnCylindricalNoArcCorr.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataInfoCylindrical.h
 Declaration of class stir::ProjDataInfoCylindrical.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataInfoCylindrical.inl
 Implementation of inline functions of class stir::ProjDataInfoCylindrical.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataInfoCylindricalArcCorr.h
 Declaration of class stir::ProjDataInfoCylindricalArcCorr.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataInfoCylindricalArcCorr.inl
 Implementation of inline functions of class stir::ProjDataInfoCylindricalArcCorr.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataInfoCylindricalNoArcCorr.h
 Declaration of class stir::ProjDataInfoCylindricalNoArcCorr.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataInfoCylindricalNoArcCorr.inl
 Implementation of inline functions of class ProjDataInfoCylindricalNoArcCorr.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataInfoGenericNoArcCorr.h
 Declaration of class stir::ProjDataInfoGenericNoArcCorr.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataInfoGenericNoArcCorr.inl
 Implementation of inline functions of class stir::ProjDataInfoGenericNoArcCorr.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataInfoPETScannerWithDiscreteDetectors.h
 Declaration of class stir::ProjDataInfoPETScannerWithDiscreteDetectors.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataInfoSubsetByView.h
 Declaration of class stir::ProjDataInfoSubsetByView.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataInMemory.h
 Declaration of class stir::ProjDataInMemory.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ProjDataInterfile.h
 Declaration of class stir::ProjDataInterfile.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/RelatedViewgrams.h
 Declaration of class stir::RelatedViewgrams.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/RelatedViewgrams.inl
 inline implementations for class stir::RelatedViewgrams
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/scale_sinograms.h
 declaration of stir::scale_sinograms and stir::get_scale_factors_per_sinogram
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/Segment.h
 Declaration of class stir::Segment.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/Segment.inl
 implementation of inline functions of class stir::Segment
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/SegmentBySinogram.h
 Declaration of class stir::SegmentBySinogram.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/SegmentBySinogram.inl
 Implementations of inline functions of class stir::SegmentBySinogram.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/SegmentByView.h
 Declaration of class stir::SegmentByView.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/SegmentByView.inl
 Implementations of inline functions of class stir::SegmentByView.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/SegmentIndices.h
 Definition of class stir::SegmentIndices.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/SegmentIndices.inl
 inline implementations for class stir::SegmentIndices
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/Sinogram.h
 Declaration of class stir::Sinogram.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/Sinogram.inl
 Implementations of inline functions of class stir::Sinogram.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/SinogramIndices.h
 Definition of class stir::SinogramIndices.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/SinogramIndices.inl
 inline implementations for class stir::SinogramIndices
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/SSRB.h
 Declaration of stir::SSRB functions.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/TrivialDataSymmetriesForViewSegmentNumbers.h
 Declaration of class stir::TrivialDataSymmetriesForViewSegmentNumbers.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/TrivialDataSymmetriesForViewSegmentNumbers.inl
 Implementation of inline-methods of class stir::TrivialDataSymmetriesForViewSegmentNumbers.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/Viewgram.h
 Declaration of class stir::Viewgram.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/Viewgram.inl
 Inline implementations of class stir::Viewgram.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ViewgramIndices.h
 Definition of class stir::ViewgramIndices.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ViewgramIndices.inl
 inline implementations for class stir::ViewgramIndices
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ViewSegmentNumbers.h
 Definition of class stir::ViewSegmentNumbers, alias to stir::ViewgramIndices.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/ViewSegmentNumbers.inl
 inline implementations for class stir::ViewSegmentNumbers
file  /home/kris/devel/STIRdistrib/STIR/src/test/test_proj_data.cxx
 Test program for stir::ProjData and stir::ProjDataInMemory.
file  /home/kris/devel/STIRdistrib/STIR/src/test/test_proj_data_info_subsets_pet.cxx
 Test program for subsetting stir::ProjDataInfo via stir::ProjDataInfoSubsetByView.
file  /home/kris/devel/STIRdistrib/STIR/src/test/test_proj_data_info_subsets_spect.cxx
 Test program for subsetting stir::ProjDataInfo via stir::ProjDataInfoSubsetByView for SPECT data.
file  /home/kris/devel/STIRdistrib/STIR/src/test/test_proj_data_maths.cxx
 Test maths of stir::ProjData.

Classes

class  stir::ArcCorrection
 A class to arc-correct projection data. More...
class  stir::Bin
 A class for storing coordinates and value of a single projection bin. More...
class  stir::DataSymmetriesForViewSegmentNumbers
 A class for encoding/finding symmetries. Works only on ViewSegmentNumbers (instead of Bin). More...
class  stir::DataWithProjDataInfo
 base class for data objects such as ProjData etc More...
class  stir::DetectionPosition< coordT >
 A class for storing coordinates of a detection. More...
class  stir::DetectionPositionPair< coordT >
 A class for storing 2 coordinates-sets of a detection, together with a timing-position index (for TOF), as suitable for PET. More...
class  stir::GeometryBlocksOnCylindrical
 A helper class to build the crystal map based on scanner info. More...
class  stir::ProjData
 The (abstract) base class for the projection data. More...
class  stir::ProjDataFromStream
 A class which reads/writes projection data from/to a (binary) stream. More...
class  stir::GE::RDF_HDF5::ProjDataGEHDF5
 A class which reads projection data from a GE HDF5 sinogram file. More...
class  stir::ProjDataInfo
 An (abstract base) class that contains information on the projection data. More...
class  stir::ProjDataInfoBlocksOnCylindricalNoArcCorr
 Projection data info for data from a scanner with discrete dtectors organised by blocks. More...
class  stir::ProjDataInfoCylindrical
 projection data info for data corresponding to a 'cylindrical' sampling. More...
class  stir::ProjDataInfoCylindricalArcCorr
 Projection data info for arc-corrected data. More...
class  stir::ProjDataInfoCylindricalNoArcCorr
 Projection data info for data which are not arc-corrected. More...
class  stir::ProjDataInfoGenericNoArcCorr
 Projection data info for data for a scanner with discrete detectors. More...
class  stir::ProjDataInfoSubsetByView
 Projection data info for data corresponding to a subset sampling by views. More...
class  stir::ProjDataInMemory
 A class which reads/writes projection data from/to memory. More...
class  stir::ProjDataInterfile
 A class which reads/writes projection data from/to a (binary) stream, but creates the corresponding Interfile header. More...
class  stir::RelatedViewgrams< elemT >
 A class for storing viewgrams which are related by symmetry. More...
class  stir::Segment< elemT >
 An (abstract base) class for storing 3d projection data. More...
class  stir::SegmentBySinogram< elemT >
 A class for storing (3d) projection data with fixed SegmentIndices. More...
class  stir::SegmentByView< elemT >
 A class for storing (3d) projection data with fixed SegmentIndices. More...
class  stir::SegmentIndices
 A very simple class to store segment numbers and any other indices that define a segment. More...
class  stir::Sinogram< elemT >
 A class for 2d projection data. More...
class  stir::SinogramIndices
 A very simple class to store all dincies to get a (2D) Sinogram. More...
class  stir::Viewgram< elemT >
 A class for 2d projection data. More...
class  stir::ViewgramIndices
 A very simple class to store all dincies to get a (2D) Viewgram. More...
class  stir::TestProjDataInfoSubsetsSPECTUB
 Test class for subsets in ProjDataInfo for SPECT data. More...
class  stir::ProjDataInMemoryTests
 Test class for ProjDataInMemory. More...

Typedefs

using stir::ProjDataInfoPETScannerWithDiscreteDetectors = ProjDataInfoCylindricalNoArcCorr
 PET Projection data info for data that correspond directly to discrete detectors (which are not arc-corrected).

Functions

Array< 3, float > stir::extend_segment (const SegmentBySinogram< float > &segment, const int view_extension=5, const int axial_extension=5, const int tangential_extension=5)
 Generic function to extend a segment in any or all directions.Axially and tangentially, the segment is filled with the nearest existing value. In view direction, the function wraps around for stir::ProjData that cover 180° or 360° degrees, and throws an error for other angular coverages.
Succeeded stir::interpolate_projdata (ProjData &proj_data_out, const ProjData &proj_data_in, const BSpline::BSplineType spline_type, const bool remove_interleaving=false)
 Perform B-Splines Interpolation.
Succeeded stir::inverse_SSRB (ProjData &proj_data_4D, const ProjData &proj_data_3D)
 Perform Inverse Single Slice Rebinning and write output to ProjData4D format.
void stir::multiply_crystal_factors (ProjData &proj_data, const ArrayType< 2, float > &efficiencies, const float global_factor)
 Construct proj-data as a multiple of crystal efficiencies (or singles).
Succeeded stir::scale_sinograms (ProjData &output_proj_data, const ProjData &input_proj_data, const Array< 2, float > scale_factors_per_sinogram)
 apply a scale factor for every sinogram
Array< 2, float > stir::get_scale_factors_per_sinogram (const ProjData &numerator_proj_data, const ProjData &denominator_proj_data, const ProjData &weights_proj_data)
 find scale factors between two different sinograms
ProjDataInfo * stir::SSRB (const ProjDataInfo &in_proj_data_info, const int num_segments_to_combine, const int num_views_to_combine=1, const int num_tangential_poss_to_trim=0, const int max_in_segment_num_to_process=-1, const int num_tof_bins_to_combine=1)
 construct new ProjDataInfo that is appropriate for rebinned data
void stir::SSRB (const std::string &output_filename, const ProjData &in_projdata, const int num_segments_to_combine, const int num_views_to_combine=1, const int num_tangential_poss_to_trim=0, const bool do_normalisation=true, const int max_in_segment_num_to_process=-1, const int num_tof_bins_to_combine=1)
 Perform Single Slice Rebinning and write output to file.
void stir::SSRB (ProjData &out_projdata, const ProjData &in_projdata, const bool do_normalisation=true)
 Perform Single Slice Rebinning and write output to ProjData.
std::ostream & stir::operator<< (std::ostream &out, const Bin &bin)
 Outputs a Bin to a stream.
template<class T>
std::ostream & stir::operator<< (std::ostream &out, const DetectionPosition< T > &det_pos)
 Outputs a DetectionPosition to a stream.
template<class T>
std::ostream & stir::operator<< (std::ostream &out, const DetectionPositionPair< T > &det_pos)
 Outputs a DetectionPositionPair to a stream.

Detailed Description

Basic support for projection data. This is the term generally used in STIR for data obtained by the scanner or immediate post-processing.

Typedef Documentation

◆ ProjDataInfoPETScannerWithDiscreteDetectors

PET Projection data info for data that correspond directly to discrete detectors (which are not arc-corrected).

The ProjDataInfo hierarchy is currently badly designed with ProjDataInfoGenericNoArcCorr derived from ProjDataInfoCylindricalNoArcCorr. See ProjDataInfoGenericNoArcCorr and https://github.com/UCL/STIR/issues/1307.

Using the current type allows future-proofing.

Function Documentation

◆ extend_segment()

Array< 3, float > stir::extend_segment ( const SegmentBySinogram< float > & segment,
const int view_extension = 5,
const int axial_extension = 5,
const int tangential_extension = 5 )

Generic function to extend a segment in any or all directions.Axially and tangentially, the segment is filled with the nearest existing value. In view direction, the function wraps around for stir::ProjData that cover 180° or 360° degrees, and throws an error for other angular coverages.

Parameters
[in,out]segmentsegment to be extended.
[in]view_extensionhow many views to add either side of the segment
[in]axial_extensionhow many axial bins to add either side of the segment
[in]tangential_extensionhow many tangential bins to add either side of the segment

References _PI, extend_segment(), stir::VectorWithOffset< T >::get_max_index(), stir::VectorWithOffset< T >::get_min_index(), stir::DataWithProjDataInfo::get_proj_data_info_sptr(), stir::Segment< elemT >::get_segment_num(), stir::Array< num_dimensions, elemT >::grow(), and warning().

Referenced by extend_segment().

◆ interpolate_projdata()

Succeeded stir::interpolate_projdata ( ProjData & proj_data_out,
const ProjData & proj_data_in,
const BSpline::BSplineType spline_type,
const bool remove_interleaving = false )

Perform B-Splines Interpolation.

Parameters
[out]proj_data_outIts projection_data_info is used to determine output characteristics. Data will be 'put' in here using ProjData::set_sinogram().
[in]proj_data_ininput data
[in]spline_typedetermines which type of BSpline will be used
[in]remove_interleavingThe STIR implementation of interpolating 3D (for the moment) projdata is a generalisation that applies B-Splines Interpolation to projdata supposing that every dimension is a regular grid. For instance, for a 3D dataset, interpolating can produce a new expanded 3D dataset based on the given information (proj_data_out). This mostly is useful in the scatter sinogram expansion.

See STIR documentation about B-Spline interpolation or scatter correction.

Todo
This currently only works for direct sinograms (i.e. segment 0).
Warning
Because of the boundary conditions in the B-spline interpolation, strange results can occur if the output sinogram has a larger range than the input sinogram.

References interpolate_projdata().

Referenced by interpolate_projdata(), and stir::ScatterEstimation::upsample_and_fit_scatter_estimate().

◆ inverse_SSRB()

Succeeded stir::inverse_SSRB ( ProjData & proj_data_4D,
const ProjData & proj_data_3D )

Perform Inverse Single Slice Rebinning and write output to ProjData4D format.

Parameters
[out]proj_data_4DIts projection_data_info is used to determine output characteristics (e.g. number of segments). Data will be 'put' in here using ProjData::set_sinogram().
[in]proj_data_3Dinput data

The STIR implementation of Inverse SSRB applies the inverse idea of SSRB. inverse_SSRB will produce oblique sinograms by finding the sinogram that has the same 'm'-coordinate (i.e. the intersection with the z-axis of the central LOR). In addition, if the output sinogram would lie 'half-way' 2 input sinograms, it will be set to the average of the 2 input sinograms.

Note that any oblique segments in proj_data_3D are currently ignored.

Input and output projectino data should have the same number of views and tangential positions.

References stir::VectorWithOffset< T >::at(), error(), stir::ProjData::get_empty_sinogram(), stir::DataWithProjDataInfo::get_max_axial_pos_num(), stir::DataWithProjDataInfo::get_max_segment_num(), stir::DataWithProjDataInfo::get_min_axial_pos_num(), stir::DataWithProjDataInfo::get_min_segment_num(), stir::DataWithProjDataInfo::get_proj_data_info_sptr(), stir::ProjData::get_sinogram(), inverse_SSRB(), stir::Array< num_dimensions, elemT >::sapyb(), stir::ProjData::set_sinogram(), and warning().

Referenced by inverse_SSRB(), stir::ScatterEstimation::process_data(), and stir::ScatterEstimation::upsample_and_fit_scatter_estimate().

◆ multiply_crystal_factors()

void stir::multiply_crystal_factors ( ProjData & proj_data,
const ArrayType< 2, float > & efficiencies,
const float global_factor )

Construct proj-data as a multiple of crystal efficiencies (or singles).

Parameters
[in,out]proj_dataprojection data to write output. This needs to be an existing object as geometry will be obtained from it.
[in]efficienciesarray of factors, one per crystal
[in]global_factorglobal additional factor to use

Sets proj_data(bin) to the product global_factor times the sum of efficiencies[c1]*efficiencies[c2] (with c1,c2 the crystals in the bin).

This is useful for normalisation, but also for randoms from singles.

Warning
If TOF data is used, each TOF bin will be set to 1/num_tof_bins the non-TOF value. This is appropriate for RFS, but would be confusing when using for normalisation.
, the name is a bit misleading. This function does currently not multiply the existing data with the efficiencies, but overwrites it.

◆ scale_sinograms()

Succeeded stir::scale_sinograms ( ProjData & output_proj_data,
const ProjData & input_proj_data,
const Array< 2, float > scale_factors_per_sinogram )

apply a scale factor for every sinogram

Parameters
[out]output_proj_datais were the new sinograms will be stored
[in]input_proj_datainput
[in]scale_factors_per_sinogramarray with the scale factors. The first index corresponds to segments, the second to axial positions.
Returns
indicates if writing failed or not

References stir::Bin::axial_pos_num(), stir::ProjDataInfo::get_max_axial_pos_num(), stir::ProjDataInfo::get_max_segment_num(), stir::ProjDataInfo::get_min_axial_pos_num(), stir::ProjDataInfo::get_min_segment_num(), stir::DataWithProjDataInfo::get_proj_data_info_sptr(), stir::ProjData::get_sinogram(), scale_sinograms(), stir::SegmentIndices::segment_num(), and stir::ProjData::set_sinogram().

Referenced by scale_sinograms(), and stir::ScatterEstimation::upsample_and_fit_scatter_estimate().

◆ get_scale_factors_per_sinogram()

Array< 2, float > stir::get_scale_factors_per_sinogram ( const ProjData & numerator_proj_data,
const ProjData & denominator_proj_data,
const ProjData & weights_proj_data )

find scale factors between two different sinograms

Parameters
[in]numerator_proj_datainput data
[in]denominator_proj_datainput data
[in]weights_proj_dataweights to be taken into account
Returns
scale_factors_per_sinogram array with the scale factors. The first index corresponds to segments, the second to axial positions.

scale factors are found for every sinogram such that

scale_factor = sum(numerator * weights) / sum(denominator * weights)
elemT sum(IterT start, IterT end, elemT init)
Compute the sum of a sequence using operator+=(), using an initial value.
Definition more_algorithms.inl:52

Currently this function sets the scale factor or a sinogram to 1 (and calls warning()) when the denominator gets too small.

References stir::Bin::axial_pos_num(), stir::ProjDataInfo::get_max_axial_pos_num(), stir::ProjDataInfo::get_max_segment_num(), stir::ProjDataInfo::get_min_axial_pos_num(), stir::ProjDataInfo::get_min_segment_num(), stir::ProjDataInfo::get_num_tangential_poss(), stir::ProjDataInfo::get_num_views(), stir::DataWithProjDataInfo::get_proj_data_info_sptr(), get_scale_factors_per_sinogram(), stir::ProjData::get_sinogram(), stir::VectorWithOffset< T >::resize(), stir::SegmentIndices::segment_num(), stir::Array< num_dimensions, elemT >::sum(), and warning().

Referenced by get_scale_factors_per_sinogram(), and stir::ScatterEstimation::upsample_and_fit_scatter_estimate().

◆ SSRB() [1/3]

ProjDataInfo * stir::SSRB ( const ProjDataInfo & in_proj_data_info,
const int num_segments_to_combine,
const int num_views_to_combine = 1,
const int num_tangential_poss_to_trim = 0,
const int max_in_segment_num_to_process = -1,
const int num_tof_bins_to_combine = 1 )

construct new ProjDataInfo that is appropriate for rebinned data

Parameters
in_proj_data_infoinput projection data information.
num_segments_to_combinehow many segments will be combined into 1 output segment.
num_views_to_combinehow many views will be combined in the output (i.e. mashing)
num_tangential_poss_to_trimcan be used to throw away some bins. Half of the bins will be thrown away at each 'side' of a sinogram (see below).
max_in_segment_num_to_processrebinned in_proj_data only upto this segment. Default value -1 means 'do all segments'.
num_tof_bins_to_combinecan be used to increase TOF mashing.

The original SSRB algorithm was developed in M.E. Daube-Witherspoon and G. Muehllehner, (1987) Treatment of axial data in three-dimensional PET, J. Nucl. Med. 28, 171-1724. It essentially ignores the obliqueness of a Line of Response and moves data to the axial position in segment 0 such that z-resolution on the axis of the scanner is preserved.

The STIR implementation of SSRB is a generalisation that applies the same idea while still allowing preserving some of the obliqueness. For instance, for a dataset with 9 segments, SSRB can produce a new dataset with only 3 segments. This essentially increases the axial compression (or span in CTI terminology), see the STIR Glossary on axial compression. In addition, SSRB can introduce extra mashing (see the STIR Glossary) of the data, i.e. add views together. Finally, it can also be used to combine TOF bins together.

Here is how to determine which bins are discarded when trimming is used. For a certain num_tangential_poss, the range is from

   -(num_tangential_poss/2) to -(num_tangential_poss/2) + num_tangential_poss - 1.

The new num_tangential_poss is simply set to old_num_tangential_poss - num_tang_poss_to_trim. Note that because of this, if num_tang_poss_to_trim is negative, more (zero) bins will be added.

Warning
in_proj_data_info has to be (at least) of type ProjDataInfoCylindrical
This function can only handle in_proj_data_info where all segments have identical 'num_segments_to_combine'. So it cannot handle standard GE Advance data.
Todo

get rid of both restrictions flagged as warnings in the documentation for this function.

rename to something much more general than SSRB

References stir::ProjDataInfo::clone(), error(), stir::ProjDataInfoCylindrical::get_axial_sampling(), stir::ProjDataInfoCylindrical::get_azimuthal_angle_offset(), stir::ProjDataInfoCylindrical::get_azimuthal_angle_sampling(), stir::ProjDataInfoCylindrical::get_m(), stir::ProjDataInfo::get_max_axial_pos_num(), stir::ProjDataInfoCylindrical::get_max_ring_difference(), stir::ProjDataInfo::get_max_segment_num(), stir::ProjDataInfo::get_min_axial_pos_num(), stir::ProjDataInfoCylindrical::get_min_ring_difference(), stir::ProjDataInfo::get_num_tangential_poss(), stir::ProjDataInfo::get_num_views(), stir::ProjDataInfo::get_tof_mash_factor(), stir::ProjDataInfoCylindrical::reduce_segment_range(), round(), stir::ProjDataInfoCylindrical::set_azimuthal_angle_offset(), stir::ProjDataInfoCylindrical::set_max_axial_pos_num(), stir::ProjDataInfoCylindrical::set_max_ring_difference(), stir::ProjDataInfoCylindrical::set_min_axial_pos_num(), stir::ProjDataInfoCylindrical::set_min_ring_difference(), stir::ProjDataInfo::set_num_tangential_poss(), stir::ProjDataInfoCylindrical::set_num_views(), stir::ProjDataInfoCylindrical::set_tof_mash_factor(), SSRB(), and warning().

Referenced by stir::ScatterEstimation::make_2D_projdata_sptr(), SSRB(), SSRB(), and SSRB().

◆ SSRB() [2/3]

void stir::SSRB ( const std::string & output_filename,
const ProjData & in_projdata,
const int num_segments_to_combine,
const int num_views_to_combine = 1,
const int num_tangential_poss_to_trim = 0,
const bool do_normalisation = true,
const int max_in_segment_num_to_process = -1,
const int num_tof_bins_to_combine = 1 )

Perform Single Slice Rebinning and write output to file.

Parameters
output_filenamefilename to write output projection data (will be in Interfile format)
in_projdatainput data
num_segments_to_combinehow many segments will be combined into 1 output segment.
max_in_segment_num_to_processrebinned in_proj_data only upto this segment. Default value -1 means 'do all segments'.
do_normalisation(default true) wether to normalise the output sinograms corresponding to how many input sinograms contribute to them.
num_tof_bins_to_combinedefaults to 1, so TOF bins are not combined.
See also
SSRB(ProjData& out_projdata, const ProjData& in_projdata, const bool do_normalisation = true)

References stir::ExamData::get_exam_info_sptr(), stir::DataWithProjDataInfo::get_proj_data_info_sptr(), and SSRB().

◆ SSRB() [3/3]

void stir::SSRB ( ProjData & out_projdata,
const ProjData & in_projdata,
const bool do_normalisation = true )

Perform Single Slice Rebinning and write output to ProjData.

Parameters
out_projdataOutput projection data. Its projection_data_info is used to determine output characteristics. Data will be 'put' in here using ProjData::set_sinogram().
in_projdatainput data
do_normalisation(default true) wether to normalise the output sinograms corresponding to how many (ignoring TOF) input sinograms contribute to them. Note that we do not normalise according to the number of TOF bins. This is because the projectors will take the width of the TOF bin properly into account (by integration over the TOF kernel). (In contrast, in spatial direction, projectors are outputting "normalised" data, i.e. corresponding to the line integral).
Warning
in_projdata has to be (at least) of type ProjDataInfoCylindrical
See also
SSRB(const ProjDataInfo& in_proj_data_info, const int num_segments_to_combine, const int num_views_to_combine, const int num_tang_poss_to_trim, const int max_in_segment_num_to_process, const int num_tof_bins_to_combine ) for information on the rebinning.

References error(), stir::ProjData::get_empty_sinogram(), stir::DataWithProjDataInfo::get_max_axial_pos_num(), stir::DataWithProjDataInfo::get_max_segment_num(), stir::DataWithProjDataInfo::get_max_tangential_pos_num(), stir::DataWithProjDataInfo::get_max_tof_pos_num(), stir::DataWithProjDataInfo::get_max_view_num(), stir::DataWithProjDataInfo::get_min_axial_pos_num(), stir::DataWithProjDataInfo::get_min_segment_num(), stir::DataWithProjDataInfo::get_min_tangential_pos_num(), stir::DataWithProjDataInfo::get_min_tof_pos_num(), stir::DataWithProjDataInfo::get_min_view_num(), stir::DataWithProjDataInfo::get_num_views(), stir::DataWithProjDataInfo::get_proj_data_info_sptr(), stir::ProjData::get_sinogram(), stir::ProjData::set_sinogram(), SSRB(), and warning().

◆ operator<<() [1/3]

std::ostream & stir::operator<< ( std::ostream & out,
const Bin & bin )
inline

◆ operator<<() [2/3]

template<class T>
std::ostream & stir::operator<< ( std::ostream & out,
const DetectionPosition< T > & det_pos )
inline

Outputs a DetectionPosition to a stream.

Output is of the form

[tangential=..., axial=..., radial=...]

◆ operator<<() [3/3]

template<class T>
std::ostream & stir::operator<< ( std::ostream & out,
const DetectionPositionPair< T > & det_pos )
inline

Outputs a DetectionPositionPair to a stream.

Output is of the form

[pos1=..., pos2=..., timing_pos=...]