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

This class is designed to manage the projection part of the reconstruction. More...

#include <oProjectorManager.hh>

Collaboration diagram for oProjectorManager:
Collaboration graph

Public Member Functions

 oProjectorManager ()
 The constructor of oProjectorManager. More...
 
 ~oProjectorManager ()
 The destructor of oProjectorManager. More...
 
int CheckParameters ()
 A function used to check the parameters settings. More...
 
int CheckSPECTAttenuationCompatibility (const string &a_pathToAttenuationImage)
 
int Initialize ()
 A function used to initialize the manager and the projectors or system matrices it manages. More...
 
void ApplyBedOffset (int a_bed)
 
void SetSensitivityModeOn ()
 Say that the projector will be used to compute the global sensitivity. More...
 
void SetSensitivityModeOff ()
 Say that the projector will no longer be used to compute the global sensitivity. More...
 
oProjectionLineComputeProjectionLine (vEvent *ap_Event, int a_th)
 
void SetVerbose (int a_verboseLevel)
 
void SetScanner (vScanner *ap_Scanner)
 
void SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 
void SetDataFile (vDataFile *ap_DataFile)
 
void SetComputationStrategy (int a_computationStrategy)
 
void SetOptionsForward (const string &a_optionsForward)
 
void SetOptionsBackward (const string &a_optionsBackward)
 
void SetOptionsCommon (const string &a_optionsCommon)
 
int GetNbTOFBins ()
 Get the number of TOF bins associated to the projector. More...
 
int GetComputationStrategy ()
 Get the computation strategy for the storage in the projection line. More...
 
bool IsForwardOperatorCompatibleWithSPECTAttenuationCorrection ()
 
bool IsBackwardOperatorCompatibleWithSPECTAttenuationCorrection ()
 
int ProcessAndSetMask (FLTNB *ap_maskImage)
 
 oProjectorManager ()
 
 ~oProjectorManager ()
 
int CheckParameters ()
 
int CheckSPECTAttenuationCompatibility (const string &a_pathToAttenuationImage)
 
int Initialize ()
 
void ApplyBedOffset (int a_bed)
 
void SetSensitivityModeOn ()
 
void SetSensitivityModeOff ()
 
oProjectionLineComputeProjectionLine (vEvent *ap_Event, int a_th)
 
void SetVerbose (int a_verboseLevel)
 
void SetScanner (vScanner *ap_Scanner)
 
void SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 
void SetDataFile (vDataFile *ap_DataFile)
 
void SetComputationStrategy (int a_computationStrategy)
 
void SetOptionsForward (const string &a_optionsForward)
 
void SetOptionsBackward (const string &a_optionsBackward)
 
void SetOptionsCommon (const string &a_optionsCommon)
 
int GetNbTOFBins ()
 
int GetComputationStrategy ()
 
bool IsForwardOperatorCompatibleWithSPECTAttenuationCorrection ()
 
bool IsBackwardOperatorCompatibleWithSPECTAttenuationCorrection ()
 
int ProcessAndSetMask (FLTNB *ap_maskImage)
 

Private Member Functions

int ParseOptionsAndInitializeProjectors ()
 Parse forward and backward projection options contained in the previously provided strings. This function is called inside the Initialize() function. More...
 
int ParseOptionsAndInitializeProjectors ()
 

Private Attributes

vScannermp_Scanner
 
oImageDimensionsAndQuantificationmp_ImageDimensionsAndQuantification
 
vDataFilemp_DataFile
 
int m_TOFMethod
 
FLTNB m_TOFBinSizeInMm
 
FLTNBmp_TOFResolutionInMm
 
FLTNBmp_TOFProbabilities
 
FLTNBmp_TOFOffsetInMm
 
FLTNB m_TOFMeasurementRangeInMm
 
bool m_TOFEventResolutionFlag
 
int m_nbTOFBins
 
bool m_applyPOI
 
int m_computationStrategy
 
string m_optionsForward
 
string m_optionsBackward
 
string m_optionsCommon
 
string m_forwardProjectorName
 
string m_backwardProjectorName
 
oSystemMatrixmp_SystemMatrixForward
 
oSystemMatrixmp_SystemMatrixBackward
 
vProjectormp_ProjectorForward
 
vProjectormp_ProjectorBackward
 
bool m_useSystemMatrixForward
 
bool m_useSystemMatrixBackward
 
bool m_useProjectorForward
 
bool m_useProjectorBackward
 
bool m_useMatchedProjectors
 
oProjectionLine ** m2p_ProjectionLines
 
int m_verbose
 
bool m_checked
 
bool m_initialized
 
bool m_applyMask
 
bool * mp_mask
 
FLTNB m_TOFResolutionInMm
 
bool m_usePerEventTOFResolution
 

Detailed Description

This class is designed to manage the projection part of the reconstruction.

As each manager class, it is created in the main program, all parameters are then set, checked, and the manager is initialized. The manager is then used by the algorithm itself, where the function ComputeProjectionLine() is called to compute the system matrix elements for the provided event, which are stored in a oProjectionLine. For multi-threading implementation, each thread have its own oProjectionLine. The manager will make use of a vProjector or a oSystemMatrix to compute the system matrix elements for forward and backward projections.

Definition at line 30 of file code/include/projector/oProjectorManager.hh.

Constructor & Destructor Documentation

◆ oProjectorManager() [1/2]

oProjectorManager::oProjectorManager ( )

The constructor of oProjectorManager.

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 18 of file code/src/projector/oProjectorManager.cc.

◆ ~oProjectorManager() [1/2]

oProjectorManager::~oProjectorManager ( )

The destructor of oProjectorManager.

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 71 of file code/src/projector/oProjectorManager.cc.

Here is the call graph for this function:

◆ oProjectorManager() [2/2]

oProjectorManager::oProjectorManager ( )

◆ ~oProjectorManager() [2/2]

oProjectorManager::~oProjectorManager ( )

Member Function Documentation

◆ ApplyBedOffset() [1/2]

void oProjectorManager::ApplyBedOffset ( int  a_bed)

Definition at line 759 of file code/src/projector/oProjectorManager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ApplyBedOffset() [2/2]

void oProjectorManager::ApplyBedOffset ( int  a_bed)

◆ CheckParameters() [1/2]

int oProjectorManager::CheckParameters ( )

A function used to check the parameters settings.

This function does not take any parameter and is used to check that all mandatory members were correctly parameterized.

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

Definition at line 130 of file code/src/projector/oProjectorManager.cc.

Here is the caller graph for this function:

◆ CheckParameters() [2/2]

int oProjectorManager::CheckParameters ( )

◆ CheckSPECTAttenuationCompatibility() [1/2]

int oProjectorManager::CheckSPECTAttenuationCompatibility ( const string &  a_pathToAttenuationImage)

Definition at line 186 of file code/src/projector/oProjectorManager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckSPECTAttenuationCompatibility() [2/2]

int oProjectorManager::CheckSPECTAttenuationCompatibility ( const string &  a_pathToAttenuationImage)

◆ ComputeProjectionLine() [1/2]

oProjectionLine * oProjectorManager::ComputeProjectionLine ( vEvent ap_Event,
int  a_th 
)

Definition at line 772 of file code/src/projector/oProjectorManager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeProjectionLine() [2/2]

oProjectionLine* oProjectorManager::ComputeProjectionLine ( vEvent ap_Event,
int  a_th 
)

◆ GetComputationStrategy() [1/2]

public inline int oProjectorManager::GetComputationStrategy ( )
inline

Get the computation strategy for the storage in the projection line.

Returns
The computation strategy m_computationStrategy

Definition at line 183 of file code/include/projector/oProjectorManager.hh.

Here is the call graph for this function:

◆ GetComputationStrategy() [2/2]

int oProjectorManager::GetComputationStrategy ( )
inline

Definition at line 183 of file include/projector/oProjectorManager.hh.

Here is the call graph for this function:

◆ GetNbTOFBins() [1/2]

public inline int oProjectorManager::GetNbTOFBins ( )
inline

Get the number of TOF bins associated to the projector.

Returns
The number of TOF bins m_nbTOFBins

Definition at line 176 of file code/include/projector/oProjectorManager.hh.

Here is the caller graph for this function:

◆ GetNbTOFBins() [2/2]

int oProjectorManager::GetNbTOFBins ( )
inline

Definition at line 176 of file include/projector/oProjectorManager.hh.

◆ Initialize() [1/2]

int oProjectorManager::Initialize ( )

◆ Initialize() [2/2]

int oProjectorManager::Initialize ( )

A function used to initialize the manager and the projectors or system matrices it manages.

This function does not take any parameter and is used to initialize everything that should be initialized. In a few words, it parses the options, then creates and initializes the projectors or system matrices based on the provided options.

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

Definition at line 221 of file code/src/projector/oProjectorManager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsBackwardOperatorCompatibleWithSPECTAttenuationCorrection() [1/2]

bool oProjectorManager::IsBackwardOperatorCompatibleWithSPECTAttenuationCorrection ( )
Returns
Return the compatibility with SPECT attenuation correction of the backward operator

Definition at line 117 of file code/src/projector/oProjectorManager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsBackwardOperatorCompatibleWithSPECTAttenuationCorrection() [2/2]

bool oProjectorManager::IsBackwardOperatorCompatibleWithSPECTAttenuationCorrection ( )

◆ IsForwardOperatorCompatibleWithSPECTAttenuationCorrection() [1/2]

bool oProjectorManager::IsForwardOperatorCompatibleWithSPECTAttenuationCorrection ( )
Returns
Return the compatibility with SPECT attenuation correction of the forward operator

Definition at line 104 of file code/src/projector/oProjectorManager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsForwardOperatorCompatibleWithSPECTAttenuationCorrection() [2/2]

bool oProjectorManager::IsForwardOperatorCompatibleWithSPECTAttenuationCorrection ( )

◆ ParseOptionsAndInitializeProjectors() [1/2]

int oProjectorManager::ParseOptionsAndInitializeProjectors ( )
private

◆ ParseOptionsAndInitializeProjectors() [2/2]

int oProjectorManager::ParseOptionsAndInitializeProjectors ( )
private

Parse forward and backward projection options contained in the previously provided strings. This function is called inside the Initialize() function.

Parse forward and backward projection options contained in the m_optionsForward and m_optionsBackward strings. Specific pure virtual functions of the vProjector are used to read parameters and initialize them. If a oSystemMatrix is used, specific functions are also called to read and initialize it. This function is called inside the Initialize() function. The syntax for the declaration of the projector and associated options is described inside the main program.

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

Definition at line 434 of file code/src/projector/oProjectorManager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessAndSetMask() [1/2]

int oProjectorManager::ProcessAndSetMask ( FLTNB ap_maskImage)

Definition at line 871 of file code/src/projector/oProjectorManager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessAndSetMask() [2/2]

int oProjectorManager::ProcessAndSetMask ( FLTNB ap_maskImage)

◆ SetComputationStrategy() [1/2]

void oProjectorManager::SetComputationStrategy ( int  a_computationStrategy)
inline

Definition at line 148 of file include/projector/oProjectorManager.hh.

◆ SetComputationStrategy() [2/2]

void oProjectorManager::SetComputationStrategy ( int  a_computationStrategy)
inline

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

Here is the caller graph for this function:

◆ SetDataFile() [1/2]

void oProjectorManager::SetDataFile ( vDataFile ap_DataFile)
inline

Definition at line 141 of file include/projector/oProjectorManager.hh.

◆ SetDataFile() [2/2]

void oProjectorManager::SetDataFile ( vDataFile ap_DataFile)
inline

Definition at line 141 of file code/include/projector/oProjectorManager.hh.

Here is the caller graph for this function:

◆ SetImageDimensionsAndQuantification() [1/2]

void oProjectorManager::SetImageDimensionsAndQuantification ( oImageDimensionsAndQuantification ap_ImageDimensionsAndQuantification)
inline

Definition at line 134 of file code/include/projector/oProjectorManager.hh.

Here is the caller graph for this function:

◆ SetImageDimensionsAndQuantification() [2/2]

void oProjectorManager::SetImageDimensionsAndQuantification ( oImageDimensionsAndQuantification ap_ImageDimensionsAndQuantification)
inline

Definition at line 134 of file include/projector/oProjectorManager.hh.

◆ SetOptionsBackward() [1/2]

void oProjectorManager::SetOptionsBackward ( const string &  a_optionsBackward)
inline

Definition at line 162 of file include/projector/oProjectorManager.hh.

◆ SetOptionsBackward() [2/2]

void oProjectorManager::SetOptionsBackward ( const string &  a_optionsBackward)
inline

Definition at line 162 of file code/include/projector/oProjectorManager.hh.

Here is the caller graph for this function:

◆ SetOptionsCommon() [1/2]

void oProjectorManager::SetOptionsCommon ( const string &  a_optionsCommon)
inline

Definition at line 169 of file include/projector/oProjectorManager.hh.

◆ SetOptionsCommon() [2/2]

void oProjectorManager::SetOptionsCommon ( const string &  a_optionsCommon)
inline

Definition at line 169 of file code/include/projector/oProjectorManager.hh.

Here is the caller graph for this function:

◆ SetOptionsForward() [1/2]

void oProjectorManager::SetOptionsForward ( const string &  a_optionsForward)
inline

Definition at line 155 of file include/projector/oProjectorManager.hh.

◆ SetOptionsForward() [2/2]

void oProjectorManager::SetOptionsForward ( const string &  a_optionsForward)
inline

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

Here is the caller graph for this function:

◆ SetScanner() [1/2]

void oProjectorManager::SetScanner ( vScanner ap_Scanner)
inline

Definition at line 127 of file code/include/projector/oProjectorManager.hh.

Here is the caller graph for this function:

◆ SetScanner() [2/2]

void oProjectorManager::SetScanner ( vScanner ap_Scanner)
inline

Definition at line 127 of file include/projector/oProjectorManager.hh.

◆ SetSensitivityModeOff() [1/2]

void oProjectorManager::SetSensitivityModeOff ( )

◆ SetSensitivityModeOff() [2/2]

void oProjectorManager::SetSensitivityModeOff ( )

Say that the projector will no longer be used to compute the global sensitivity.

It restores the TOF application, as well as POI, and set the sensitivity mode off for the vProjector

Definition at line 736 of file code/src/projector/oProjectorManager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetSensitivityModeOn() [1/2]

void oProjectorManager::SetSensitivityModeOn ( )

◆ SetSensitivityModeOn() [2/2]

void oProjectorManager::SetSensitivityModeOn ( )

Say that the projector will be used to compute the global sensitivity.

It change the TOF application, as well as POI, and set the sensitivity mode on for the vProjector

Definition at line 718 of file code/src/projector/oProjectorManager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetVerbose() [1/2]

void oProjectorManager::SetVerbose ( int  a_verboseLevel)
inline

Definition at line 120 of file include/projector/oProjectorManager.hh.

◆ SetVerbose() [2/2]

void oProjectorManager::SetVerbose ( int  a_verboseLevel)
inline

Definition at line 120 of file code/include/projector/oProjectorManager.hh.

Here is the caller graph for this function:

Member Data Documentation

◆ m2p_ProjectionLines

oProjectionLine ** oProjectorManager::m2p_ProjectionLines
private

The table of pointers to the oProjectionLines, one per thread

Definition at line 259 of file code/include/projector/oProjectorManager.hh.

◆ m_applyMask

bool oProjectorManager::m_applyMask
private

Apply the voxel mask to projectors

Definition at line 267 of file code/include/projector/oProjectorManager.hh.

◆ m_applyPOI

bool oProjectorManager::m_applyPOI
private

Boolean that says if we apply POI or not

Definition at line 238 of file code/include/projector/oProjectorManager.hh.

◆ m_backwardProjectorName

string oProjectorManager::m_backwardProjectorName
private

The name of the backward projector provided in the options

Definition at line 248 of file code/include/projector/oProjectorManager.hh.

◆ m_checked

bool oProjectorManager::m_checked
private

Boolean that says if the parameters were checked or not

Definition at line 263 of file code/include/projector/oProjectorManager.hh.

◆ m_computationStrategy

int oProjectorManager::m_computationStrategy
private

The integer describing the computation strategy for system matrix elements storage

Definition at line 240 of file code/include/projector/oProjectorManager.hh.

◆ m_forwardProjectorName

string oProjectorManager::m_forwardProjectorName
private

The name of the forward projector provided in the options

Definition at line 247 of file code/include/projector/oProjectorManager.hh.

◆ m_initialized

bool oProjectorManager::m_initialized
private

Boolean that says if the manager was initialized or not

Definition at line 265 of file code/include/projector/oProjectorManager.hh.

◆ m_nbTOFBins

int oProjectorManager::m_nbTOFBins
private

The number of TOF bins in use

Definition at line 237 of file code/include/projector/oProjectorManager.hh.

◆ m_optionsBackward

string oProjectorManager::m_optionsBackward
private

The string containing options for the backward projections

Definition at line 243 of file code/include/projector/oProjectorManager.hh.

◆ m_optionsCommon

string oProjectorManager::m_optionsCommon
private

The string containing common options for the projectors

Definition at line 245 of file code/include/projector/oProjectorManager.hh.

◆ m_optionsForward

string oProjectorManager::m_optionsForward
private

The string containing options for the forward projections

Definition at line 242 of file code/include/projector/oProjectorManager.hh.

◆ m_TOFBinSizeInMm

FLTNB oProjectorManager::m_TOFBinSizeInMm
private

The size in mm of a single TOF bin (either cumulative bin for histogrammed data or quantization bin for list-mode data)

Definition at line 231 of file code/include/projector/oProjectorManager.hh.

◆ m_TOFEventResolutionFlag

bool oProjectorManager::m_TOFEventResolutionFlag
private

Flag that says if TOF information is included in each coincidence event (list-mode). Default = false

Definition at line 236 of file code/include/projector/oProjectorManager.hh.

◆ m_TOFMeasurementRangeInMm

FLTNB oProjectorManager::m_TOFMeasurementRangeInMm
private

Total span of TOF measurements (in mm)

Definition at line 235 of file code/include/projector/oProjectorManager.hh.

◆ m_TOFMethod

int oProjectorManager::m_TOFMethod
private

Integer tagging the type of TOF use

Definition at line 230 of file code/include/projector/oProjectorManager.hh.

◆ m_TOFResolutionInMm

FLTNB oProjectorManager::m_TOFResolutionInMm
private

Resolution (FWHM) of the time-of-flight Gaussian distribution (in mm)

Definition at line 232 of file include/projector/oProjectorManager.hh.

◆ m_useMatchedProjectors

bool oProjectorManager::m_useMatchedProjectors
private

Boolean that says if matched projectors are used

Definition at line 257 of file code/include/projector/oProjectorManager.hh.

◆ m_usePerEventTOFResolution

bool oProjectorManager::m_usePerEventTOFResolution
private

Use per event TOF standard deviation

Definition at line 266 of file include/projector/oProjectorManager.hh.

◆ m_useProjectorBackward

bool oProjectorManager::m_useProjectorBackward
private

Boolean that says if a vProjector is used for backward projections

Definition at line 256 of file code/include/projector/oProjectorManager.hh.

◆ m_useProjectorForward

bool oProjectorManager::m_useProjectorForward
private

Boolean that says if a vProjector is used for forward projections

Definition at line 255 of file code/include/projector/oProjectorManager.hh.

◆ m_useSystemMatrixBackward

bool oProjectorManager::m_useSystemMatrixBackward
private

Boolean that says if a oSystemMatrix is used for backward projections

Definition at line 254 of file code/include/projector/oProjectorManager.hh.

◆ m_useSystemMatrixForward

bool oProjectorManager::m_useSystemMatrixForward
private

Boolean that says if a oSystemMatrix is used for forward projections

Definition at line 253 of file code/include/projector/oProjectorManager.hh.

◆ m_verbose

int oProjectorManager::m_verbose
private

The verbose level

Definition at line 261 of file code/include/projector/oProjectorManager.hh.

◆ mp_DataFile

vDataFile * oProjectorManager::mp_DataFile
private

Pointer to a vDataFile object in use

Definition at line 228 of file code/include/projector/oProjectorManager.hh.

◆ mp_ImageDimensionsAndQuantification

oImageDimensionsAndQuantification * oProjectorManager::mp_ImageDimensionsAndQuantification
private

Pointer to the oImageDimensionsAndQuantification object in use

Definition at line 226 of file code/include/projector/oProjectorManager.hh.

◆ mp_mask

bool * oProjectorManager::mp_mask
private

Mask for voxels: only true voxels will be taken into account for projector coefficients computation (currently 3D - XYZ)

Definition at line 268 of file code/include/projector/oProjectorManager.hh.

◆ mp_ProjectorBackward

vProjector * oProjectorManager::mp_ProjectorBackward
private

The pointer to the vProjector used for backward projections

Definition at line 252 of file code/include/projector/oProjectorManager.hh.

◆ mp_ProjectorForward

vProjector * oProjectorManager::mp_ProjectorForward
private

The pointer to the vProjector used for forward projections

Definition at line 251 of file code/include/projector/oProjectorManager.hh.

◆ mp_Scanner

vScanner * oProjectorManager::mp_Scanner
private

Pointer to the vScanner object in use

Definition at line 224 of file code/include/projector/oProjectorManager.hh.

◆ mp_SystemMatrixBackward

oSystemMatrix * oProjectorManager::mp_SystemMatrixBackward
private

The pointer to the oSystemMatrix used for backward projections

Definition at line 250 of file code/include/projector/oProjectorManager.hh.

◆ mp_SystemMatrixForward

oSystemMatrix * oProjectorManager::mp_SystemMatrixForward
private

The pointer to the oSystemMatrix used for forward projections

Definition at line 249 of file code/include/projector/oProjectorManager.hh.

◆ mp_TOFOffsetInMm

FLTNB* oProjectorManager::mp_TOFOffsetInMm
private

TOF shift in Mm relatively to the center of the TOF measurement, used to position the tof kernel. Default = no shift

Definition at line 234 of file code/include/projector/oProjectorManager.hh.

◆ mp_TOFProbabilities

FLTNB* oProjectorManager::mp_TOFProbabilities
private

TOF probability for multi-parameter resolution(s) in ps. Default = equal probabilities for each resolution

Definition at line 233 of file code/include/projector/oProjectorManager.hh.

◆ mp_TOFResolutionInMm

FLTNB* oProjectorManager::mp_TOFResolutionInMm
private

Resolution (FWHM) of the time-of-flight Gaussian distribution (in mm)

Definition at line 232 of file code/include/projector/oProjectorManager.hh.


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