CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
Public Member Functions | Private Member Functions | Private Attributes | List of all members
iProjectorJoseph Class Reference

This class is a child of the vProjector class implementing the Joseph ray tracer. More...

#include <iProjectorJoseph.hh>

Inheritance diagram for iProjectorJoseph:
Inheritance graph
Collaboration diagram for iProjectorJoseph:
Collaboration graph

Public Member Functions

 iProjectorJoseph ()
 The constructor of iProjectorJoseph. More...
 
 ~iProjectorJoseph ()
 The destructor of iProjectorJoseph. More...
 
int ReadConfigurationFile (const string &a_configurationFile)
 
int ReadOptionsList (const string &a_optionsList)
 
INTNB EstimateMaxNumberOfVoxelsPerLine ()
 This function is used to compute and provide an estimate of the maximum number of voxels that could contribute to a projected line. More...
 
 iProjectorJoseph ()
 
 ~iProjectorJoseph ()
 
int ReadConfigurationFile (const string &a_configurationFile)
 
int ReadOptionsList (const string &a_optionsList)
 
INTNB EstimateMaxNumberOfVoxelsPerLine ()
 This function is used to compute and provide an estimate of the maximum number of voxels that could contribute to a projected line. More...
 
- Public Member Functions inherited from vProjector
 vProjector ()
 The constructor of vProjector. More...
 
virtual ~vProjector ()
 The destructor of vProjector. More...
 
void ShowHelp ()
 A function used to show help about the projector. More...
 
int ReadCommonOptionsList (const string &a_optionsList)
 
int CheckParameters ()
 A public function used to check the parameters settings. More...
 
int Initialize ()
 A public function used to initialize the projector. More...
 
int Project (int a_direction, oProjectionLine *ap_ProjectionLine, uint32_t *ap_index1, uint32_t *ap_index2, int a_nbIndices)
 
void SetVerbose (int a_verbose)
 
void SetScanner (vScanner *ap_Scanner)
 
void SetSensitivityMode (bool a_sensitivityMode)
 
void SetApplyTOF (int a_applyTOF)
 
void SetApplyPOI (bool a_applyPOI)
 
int SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 
bool GetCompatibilityWithSPECTAttenuationCorrection ()
 
bool GetCompatibilityWithCompression ()
 
void SetMask (bool *ap_mask)
 
FLTNB GetTOFResolutionInMm (int a_resolution)
 
FLTNB GetTOFProbabilities (int a_resolution)
 This function is used to get the TOF probability. More...
 
FLTNB GetTOFOffsetInMm (int a_resolution)
 This function is used to get the TOF offsets. More...
 
void SetTOFResolutionInMm (FLTNB *ap_TOFResolutionInMm)
 
void SetTOFProbabilities (FLTNB *ap_TOFProbabilities)
 This function is used to set the TOF probabilities in use. More...
 
void SetTOFOffsetInMm (FLTNB *ap_TOFOffsetsInMm)
 This function is used to set the TOF Offset in use. More...
 
FLTNB GetTOFMeasurementRangeInMm ()
 This function is used to get the TOF measurement range in mm. More...
 
void SetTOFMeasurementRangeInMm (FLTNB a_TOFMeasurementRangeInMm)
 
void SetTOFEventResolutionFlag (FLTNB a_TOFEventResolutionFlag)
 This function sets the per-event TOF resolution flag. More...
 
bool GetTOFEventResolutionFlag ()
 
FLTNB GetTOFBinSizeInMm ()
 This function is used to get the size in mm of a TOF bin. More...
 
void SetTOFBinSizeInMm (FLTNB a_TOFBinSizeInMm)
 
int GetNbTOFResolutions ()
 
void SetNbTOFResolutions (int a_nbTOFResolutions)
 
 vProjector ()
 
virtual ~vProjector ()
 
void ShowHelp ()
 
int ReadCommonOptionsList (const string &a_optionsList)
 
int CheckParameters ()
 
int Initialize ()
 
int Project (int a_direction, oProjectionLine *ap_ProjectionLine, uint32_t *ap_index1, uint32_t *ap_index2, int a_nbIndices)
 
void SetVerbose (int a_verbose)
 
void SetScanner (vScanner *ap_Scanner)
 
void SetSensitivityMode (bool a_sensitivityMode)
 
void SetApplyTOF (int a_applyTOF)
 
void SetApplyPOI (bool a_applyPOI)
 
int SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 
bool GetCompatibilityWithSPECTAttenuationCorrection ()
 
bool GetCompatibilityWithCompression ()
 
void SetMask (bool *ap_mask)
 
FLTNB GetTOFResolutionInMm ()
 This function is used to get the TOF resolution in mm. More...
 
void SetTOFResolutionInMm (FLTNB a_TOFResolutionInMm)
 
FLTNB GetTOFMeasurementRangeInMm ()
 
void SetTOFMeasurementRangeInMm (FLTNB a_TOFMeasurementRangeInMm)
 
FLTNB GetTOFBinSizeInMm ()
 
void SetTOFBinSizeInMm (FLTNB a_TOFBinSizeInMm)
 
void SetReadPerEventTOFResolution (bool a_readPerEventTOFResolution)
 This function is used to set flag informing that TOF resolution should be read per event from datafile. More...
 

Private Member Functions

void ShowHelpSpecific ()
 A function used to show help about the child module. More...
 
int CheckSpecificParameters ()
 A private function used to check the parameters settings specific to the child projector. More...
 
int InitializeSpecific ()
 This function is used to initialize specific stuff to the child projector. More...
 
int ProjectWithoutTOF (int a_direction, oProjectionLine *ap_ProjectionLine)
 
int ProjectTOFListmode (int a_direction, oProjectionLine *ap_ProjectionLine)
 
int ProjectTOFHistogram (int a_direction, oProjectionLine *ap_ProjectionLine)
 
void ShowHelpSpecific ()
 A function used to show help about the child module. More...
 
int CheckSpecificParameters ()
 A private function used to check the parameters settings specific to the child projector. More...
 
int InitializeSpecific ()
 A private function used to initialize everything specific to the child projector. More...
 
int ProjectWithoutTOF (int a_direction, oProjectionLine *ap_ProjectionLine)
 
int ProjectTOFListmode (int a_direction, oProjectionLine *ap_ProjectionLine)
 
int ProjectTOFHistogram (int a_direction, oProjectionLine *ap_ProjectionLine)
 

Private Attributes

HPFLTNBmp_boundariesX
 
HPFLTNBmp_boundariesY
 
HPFLTNBmp_boundariesZ
 
uint8_t * mp_maskPad
 
HPFLTNB m_tolerance_fctr
 
HPFLTNB m_toleranceX
 
HPFLTNB m_toleranceY
 
HPFLTNB m_toleranceZ
 
HPFLTNB m_boundX
 
HPFLTNB m_boundY
 
HPFLTNB m_boundZ
 

Additional Inherited Members

- Static Public Member Functions inherited from vProjector
static void ShowCommonHelp ()
 This function is used to print out some help about the use of options common to all projectors. It is static because it is called in main without instantiating an object. More...
 
static void ShowCommonHelp ()
 
- Protected Attributes inherited from vProjector
FLTNB mp_sizeVox [3]
 
INTNB mp_nbVox [3]
 
INTNB m_nbVoxXY
 
FLTNB mp_halfFOV [3]
 
oImageDimensionsAndQuantificationmp_ImageDimensionsAndQuantification
 
vScannermp_Scanner
 
int m_TOFMethod
 
FLTNB m_TOFNbSigmas
 
INTNB m_TOFWeightingFcnNbSamples
 
bool m_TOFWeightingFcnPrecomputedFlag
 
bool m_TOFBinProperProcessingFlag
 
HPFLTNB ** m2p_TOFWeightingFcn
 
int m_nbTOFResolutions
 
FLTNB m_TOFBinSizeInMm
 
FLTNB m_TOFMeasurementRangeInMm
 
FLTNB m_TOFLargestResolutionInMm
 
FLTNBmp_TOFResolutionInMm
 
FLTNBmp_TOFProbabilities
 
FLTNBmp_TOFOffsetInMm
 
FLTNBmp_TOFGaussianNormCoef
 
FLTNB m_TOFPrecomputedSamplingFactor
 
bool m_TOFEventResolutionFlag
 
bool * mp_mask
 
bool m_hasMask
 
bool m_applyPOI
 
bool m_sensitivityMode
 
bool m_compatibleWithSPECTAttenuationCorrection
 
bool m_compatibleWithCompression
 
int m_verbose
 
bool m_checked
 
bool m_initialized
 
HPFLTNBmp_TOFWeightingFcn
 
FLTNB m_TOFResolutionInMm
 
FLTNB m_TOFGaussianNormCoef
 
bool m_readPerEventTOFResolution
 

Detailed Description

This class is a child of the vProjector class implementing the Joseph ray tracer.

This class implements the Joseph algorithm which is a ray-tracer using bi-linear interpolations. Reference: P. M. Joseph, "An improved algorithm for reprojecting rays through pixel images", IEEE Trans. Med. Imaging, vol. 1, pp. 192-6, 1982.

Definition at line 22 of file code/include/projector/iProjectorJoseph.hh.

Constructor & Destructor Documentation

◆ iProjectorJoseph() [1/2]

iProjectorJoseph::iProjectorJoseph ( )

The constructor of iProjectorJoseph.

This is the default and unique constructor. It does not take any parameter and its role is only to affect default values to each member of the class.

Definition at line 24 of file code/src/projector/iProjectorJoseph.cc.

◆ ~iProjectorJoseph() [1/2]

iProjectorJoseph::~iProjectorJoseph ( )

The destructor of iProjectorJoseph.

This is the default and unique destructor. It does not take any parameter and its role is only to free or delete all structures that were built by this class.

Definition at line 49 of file code/src/projector/iProjectorJoseph.cc.

◆ iProjectorJoseph() [2/2]

iProjectorJoseph::iProjectorJoseph ( )

◆ ~iProjectorJoseph() [2/2]

iProjectorJoseph::~iProjectorJoseph ( )

Member Function Documentation

◆ CheckSpecificParameters() [1/2]

int iProjectorJoseph::CheckSpecificParameters ( )
privatevirtual

A private function used to check the parameters settings specific to the child projector.

This function is used to check that all parameters specific to the projector are correctly set within allowed values. It is called by the CheckParameters() function of the mother class. It is the implementation of the pure virtual function inherited from the abstract mother class vProjector.

Returns
An integer reflecting the check status; 0 if no problem, another value otherwise.

Implements vProjector.

Definition at line 142 of file code/src/projector/iProjectorJoseph.cc.

◆ CheckSpecificParameters() [2/2]

int iProjectorJoseph::CheckSpecificParameters ( )
privatevirtual

A private function used to check the parameters settings specific to the child projector.

This function is used to check that all parameters specific to the projector are correctly set within allowed values. It is called by the CheckParameters() function. It is pure virtual so is implemented by children.

Returns
An integer reflecting the check status; 0 if no problem, another value otherwise.

Implements vProjector.

◆ EstimateMaxNumberOfVoxelsPerLine() [1/2]

INTNB iProjectorJoseph::EstimateMaxNumberOfVoxelsPerLine ( )
virtual

This function is used to compute and provide an estimate of the maximum number of voxels that could contribute to a projected line.

This function is an overloaded implementation of the virtual mother function. It is used to compute and provide an estimate of the maximum number of voxels that could contribute to a projected line.

Returns
The estimate of the maximum number of voxels contributing to a line.

Reimplemented from vProjector.

Definition at line 209 of file code/src/projector/iProjectorJoseph.cc.

Here is the call graph for this function:

◆ EstimateMaxNumberOfVoxelsPerLine() [2/2]

INTNB iProjectorJoseph::EstimateMaxNumberOfVoxelsPerLine ( )
virtual

This function is used to compute and provide an estimate of the maximum number of voxels that could contribute to a projected line.

The vProjector implementation simply returns the total image's number of voxels, but it can be overloaded by children to provide a better estimate in order to optimize and reduce memory requirements of the oProjectionLine buffers when using the FIXED_LIST_STRATEGY.

Returns
The estimate of the maximum number of voxels contributing to a line.

Reimplemented from vProjector.

◆ InitializeSpecific() [1/2]

int iProjectorJoseph::InitializeSpecific ( )
privatevirtual

This function is used to initialize specific stuff to the child projector.

It is called by the public Initialize() function from the mother.

Returns
An integer reflecting the initialization status; 0 if no problem, another value otherwise.

Implements vProjector.

Definition at line 162 of file code/src/projector/iProjectorJoseph.cc.

◆ InitializeSpecific() [2/2]

int iProjectorJoseph::InitializeSpecific ( )
privatevirtual

A private function used to initialize everything specific to the child projector.

This function is used to initialize everything specific to the projector that should be initialized. It is called by the Initialize() function. It is pure virtual so is implemented by children.

Returns
An integer reflecting the initialization status; 0 if no problem, another value otherwise.

Implements vProjector.

◆ ProjectTOFHistogram() [1/2]

int iProjectorJoseph::ProjectTOFHistogram ( int  a_direction,
oProjectionLine ap_ProjectionLine 
)
privatevirtual

Implements vProjector.

Definition at line 1065 of file code/src/projector/iProjectorJoseph.cc.

Here is the call graph for this function:

◆ ProjectTOFHistogram() [2/2]

int iProjectorJoseph::ProjectTOFHistogram ( int  a_direction,
oProjectionLine ap_ProjectionLine 
)
privatevirtual

Implements vProjector.

◆ ProjectTOFListmode() [1/2]

int iProjectorJoseph::ProjectTOFListmode ( int  a_direction,
oProjectionLine ap_ProjectionLine 
)
privatevirtual

Implements vProjector.

◆ ProjectTOFListmode() [2/2]

int iProjectorJoseph::ProjectTOFListmode ( int  a_direction,
oProjectionLine ap_ProjectionLine 
)
privatevirtual

Implements vProjector.

Definition at line 541 of file code/src/projector/iProjectorJoseph.cc.

Here is the call graph for this function:

◆ ProjectWithoutTOF() [1/2]

int iProjectorJoseph::ProjectWithoutTOF ( int  a_direction,
oProjectionLine ap_ProjectionLine 
)
privatevirtual

Implements vProjector.

◆ ProjectWithoutTOF() [2/2]

int iProjectorJoseph::ProjectWithoutTOF ( int  a_direction,
oProjectionLine ap_ProjectionLine 
)
privatevirtual

Implements vProjector.

Definition at line 226 of file code/src/projector/iProjectorJoseph.cc.

Here is the call graph for this function:

◆ ReadConfigurationFile() [1/2]

int iProjectorJoseph::ReadConfigurationFile ( const string &  a_configurationFile)
virtual

Implements vProjector.

◆ ReadConfigurationFile() [2/2]

int iProjectorJoseph::ReadConfigurationFile ( const string &  a_configurationFile)
virtual

Implements vProjector.

Definition at line 81 of file code/src/projector/iProjectorJoseph.cc.

◆ ReadOptionsList() [1/2]

int iProjectorJoseph::ReadOptionsList ( const string &  a_optionsList)
virtual

Implements vProjector.

Definition at line 94 of file code/src/projector/iProjectorJoseph.cc.

Here is the call graph for this function:

◆ ReadOptionsList() [2/2]

int iProjectorJoseph::ReadOptionsList ( const string &  a_optionsList)
virtual

Implements vProjector.

◆ ShowHelpSpecific() [1/2]

void iProjectorJoseph::ShowHelpSpecific ( )
privatevirtual

A function used to show help about the child module.

This function must describe what the projector does and how to use it. It describes in details the different parameters of the projector, and how to set them through the use of a configuration file or a list of options. It is pure virtual so is implemented by children. It is private because called by the public ShowHelp() function.

Implements vProjector.

◆ ShowHelpSpecific() [2/2]

void iProjectorJoseph::ShowHelpSpecific ( )
privatevirtual

A function used to show help about the child module.

This function must describe what the projector does and how to use it. It describes in details the different parameters of the projector, and how to set them through the use of a configuration file or a list of options. It is pure virtual so is implemented by children. It is private because called by the public ShowHelp() function.

Implements vProjector.

Definition at line 125 of file code/src/projector/iProjectorJoseph.cc.

Member Data Documentation

◆ m_boundX

HPFLTNB iProjectorJoseph::m_boundX
private

Limit bound for X-axis

Definition at line 158 of file code/include/projector/iProjectorJoseph.hh.

◆ m_boundY

HPFLTNB iProjectorJoseph::m_boundY
private

Limit bound for Y-axis

Definition at line 159 of file code/include/projector/iProjectorJoseph.hh.

◆ m_boundZ

HPFLTNB iProjectorJoseph::m_boundZ
private

Limit bound for Z-axis

Definition at line 160 of file code/include/projector/iProjectorJoseph.hh.

◆ m_tolerance_fctr

HPFLTNB iProjectorJoseph::m_tolerance_fctr
private

General tolerance factor to avoid error on boundaries, set to 10^-6 by default

Definition at line 154 of file code/include/projector/iProjectorJoseph.hh.

◆ m_toleranceX

HPFLTNB iProjectorJoseph::m_toleranceX
private

Tolerance to avoid error on boundaries, for X axis

Definition at line 155 of file code/include/projector/iProjectorJoseph.hh.

◆ m_toleranceY

HPFLTNB iProjectorJoseph::m_toleranceY
private

Tolerance to avoid error on boundaries, for Y axis

Definition at line 156 of file code/include/projector/iProjectorJoseph.hh.

◆ m_toleranceZ

HPFLTNB iProjectorJoseph::m_toleranceZ
private

Tolerance to avoid error on boundaries, for Z axis

Definition at line 157 of file code/include/projector/iProjectorJoseph.hh.

◆ mp_boundariesX

HPFLTNB * iProjectorJoseph::mp_boundariesX
private

Boundaries for X axis

Definition at line 148 of file code/include/projector/iProjectorJoseph.hh.

◆ mp_boundariesY

HPFLTNB * iProjectorJoseph::mp_boundariesY
private

Boundaries for Y axis

Definition at line 149 of file code/include/projector/iProjectorJoseph.hh.

◆ mp_boundariesZ

HPFLTNB * iProjectorJoseph::mp_boundariesZ
private

Boundaries for Z axis

Definition at line 150 of file code/include/projector/iProjectorJoseph.hh.

◆ mp_maskPad

uint8_t * iProjectorJoseph::mp_maskPad
private

Mask for the padded image space

Definition at line 151 of file code/include/projector/iProjectorJoseph.hh.


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