STIR
6.2.0
|
Modules | |
Items related to Line Of Responses (preliminary) | |
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::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::ProjDataInfoGeneric |
projection data info for data corresponding to 'Generic' sampling. 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 dataThis stores a subset of the data accessible via a ProjData object, where the SegmentIndices are fixed. 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::ProjDataInMemoryTests |
Test class for ProjDataInMemory. More... | |
Functions | |
Succeeded | stir::inverse_SSRB (ProjData &proj_data_4D, const ProjData &proj_data_3D) |
Perform Inverse Single Slice Rebinning and write output to ProjData4D format. More... | |
void | stir::multiply_crystal_factors (ProjData &proj_data, const Array< 2, float > &efficiencies, const float global_factor) |
Construct proj-data as a multiple of crystal efficiencies (or singles) More... | |
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 More... | |
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 More... | |
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 More... | |
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. More... | |
void | stir::SSRB (ProjData &out_projdata, const ProjData &in_projdata, const bool do_normalisation=true) |
Perform Single Slice Rebinning and write output to ProjData. More... | |
std::ostream & | stir::operator<< (std::ostream &out, const Bin &bin) |
Outputs a Bin to a stream.Output is of the form. More... | |
template<class T > | |
std::ostream & | stir::operator<< (std::ostream &out, const DetectionPosition< T > &det_pos) |
Outputs a DetectionPosition to a stream.Output is of the form. More... | |
template<class T > | |
std::ostream & | stir::operator<< (std::ostream &out, const DetectionPositionPair< T > &det_pos) |
Outputs a DetectionPosition to a stream.Output is of the form. More... | |
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. More... | |
Succeeded | stir::interpolate_projdata (ProjData &proj_data_out, const ProjData &proj_data_in, const BasicCoordinate< 3, BSpline::BSplineType > &these_types, const bool remove_interleaving) |
Basic support for projection data. This is the term generally used in STIR for data obtained by the scanner or immediate post-processing.
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.
[out] | proj_data_out | Its projection_data_info is used to determine output characteristics. Data will be 'put' in here using ProjData::set_sinogram(). |
[in] | proj_data_in | input data |
[in] | spline_type | determines which type of BSpline will be used |
[in] | remove_interleaving | The 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.
Referenced by stir::ScatterEstimation::upsample_and_fit_scatter_estimate().
Perform Inverse Single Slice Rebinning and write output to ProjData4D format.
[out] | proj_data_4D | Its 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_3D | input 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(), stir::ProjData::get_empty_sinogram(), stir::ProjData::get_max_axial_pos_num(), stir::ProjData::get_max_segment_num(), stir::ProjData::get_min_axial_pos_num(), stir::ProjData::get_min_segment_num(), stir::ProjData::get_proj_data_info_sptr(), and stir::warning().
Referenced by stir::ScatterEstimation::upsample_and_fit_scatter_estimate().
void stir::multiply_crystal_factors | ( | ProjData & | proj_data, |
const Array< 2, float > & | efficiencies, | ||
const float | global_factor | ||
) |
Construct proj-data as a multiple of crystal efficiencies (or singles)
[in,out] | proj_data | projection data to write output. This needs to be an existing object as geometry will be obtained from it. |
[in] | efficiencies | array of factors, one per crystal |
[in] | global_factor | global 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.
References stir::error(), and stir::ProjData::get_proj_data_info_sptr().
Referenced by stir::randoms_from_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
[out] | output_proj_data | is were the new sinograms will be stored |
[in] | input_proj_data | input |
[in] | scale_factors_per_sinogram | array with the scale factors. The first index corresponds to segments, the second to axial positions. |
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::ProjData::get_proj_data_info_sptr(), stir::ProjData::get_sinogram(), stir::SegmentIndices::segment_num(), and stir::ProjData::set_sinogram().
Referenced by stir::ScatterEstimation::upsample_and_fit_scatter_estimate().
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
[in] | numerator_proj_data | input data |
[in] | denominator_proj_data | input data |
[in] | weights_proj_data | weights to be taken into account |
scale factors are found for every sinogram such that
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::ProjData::get_proj_data_info_sptr(), stir::ProjData::get_sinogram(), stir::VectorWithOffset< T >::resize(), stir::SegmentIndices::segment_num(), stir::Array< num_dimensions, elemT >::sum(), stir::Array< 2, elemT >::sum(), and stir::warning().
Referenced by stir::ScatterEstimation::upsample_and_fit_scatter_estimate().
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
in_proj_data_info | input projection data information. |
num_segments_to_combine | how many segments will be combined into 1 output segment. |
num_views_to_combine | how many views will be combined in the output (i.e. mashing) |
num_tangential_poss_to_trim | can 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_process | rebinned in_proj_data only upto this segment. Default value -1 means 'do all segments'. |
num_tof_bins_to_combine | can 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.
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(), stir::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(), stir::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(), and stir::warning().
Referenced by stir::FBP2DReconstruction::FBP2DReconstruction(), and stir::ScatterEstimation::make_2D_projdata_sptr().
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.
output_filename | filename to write output projection data (will be in Interfile format) |
in_projdata | input data |
num_segments_to_combine | how many segments will be combined into 1 output segment. |
max_in_segment_num_to_process | rebinned 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_combine | defaults to 1, so TOF bins are not combined. |
References stir::ExamData::get_exam_info_sptr(), stir::ProjData::get_proj_data_info_sptr(), and stir::SSRB().
void stir::SSRB | ( | ProjData & | out_projdata, |
const ProjData & | in_projdata, | ||
const bool | do_normalisation = true |
||
) |
Perform Single Slice Rebinning and write output to ProjData.
out_projdata | Output projection data. Its projection_data_info is used to determine output characteristics. Data will be 'put' in here using ProjData::set_sinogram(). |
in_projdata | input 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). |
References stir::ProjData::get_proj_data_info_sptr().
Referenced by stir::SSRB().
|
inline |
Outputs a Bin to a stream.Output is of the form.
[segment_num=xx,....., value=..]
References stir::Bin::axial_pos_num(), stir::Bin::get_bin_value(), stir::SegmentIndices::segment_num(), stir::Bin::tangential_pos_num(), stir::Bin::time_frame_num(), stir::SegmentIndices::timing_pos_num(), and stir::ViewgramIndices::view_num().
|
inline |
Outputs a DetectionPosition to a stream.Output is of the form.
[tangential=..., axial=..., radial=...]
|
inline |
Outputs a DetectionPosition to a stream.Output is of the form.
[pos1=..., pos2=..., timing_pos=...]
References stir::operator>>().