CASToR  2.0
Tomographic Reconstruction (PET/SPECT/CT)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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)
 A function used to check specific compatibility with SPECT and attenuation correction. More...
 
int Initialize ()
 A function used to initialize the manager and the projectors or system matrices it manages. More...
 
void ApplyBedOffset (int a_bed)
 Compute the bed offset from the provided bed index and apply it to all projection lines. More...
 
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)
 This function is used to compute system matrix elements from the associated projector or pre-computed system matrix given a vEvent, a bed position and a thread index. As this function returns a pointer to a oProjectionLine (filled from its own oProjectionLine buffers), if a problem occurs, it returns the NULL pointer. More...
 
void SetVerbose (int a_verboseLevel)
 Set the verbose level. More...
 
void SetScanner (vScanner *ap_Scanner)
 Set the scanner in use. More...
 
void SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 Set the image dimensions in use. More...
 
void SetDataFile (vDataFile *ap_DataFile)
 Set a data file in use to later recover some information from it. More...
 
void SetComputationStrategy (int a_computationStrategy)
 Set the computation strategy for the system matrix elements storage. More...
 
void SetOptionsForward (const string &a_optionsForward)
 Set the forward projection options contained in the provided string. More...
 
void SetOptionsBackward (const string &a_optionsBackward)
 Set the backward projection options contained in the provided string. More...
 
void SetOptionsCommon (const string &a_optionsCommon)
 Set the common projection options contained in the provided string. More...
 
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)
 Process and set the provided mask image for projector masking. More...
 

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

Private Attributes

vScannermp_Scanner
 
oImageDimensionsAndQuantificationmp_ImageDimensionsAndQuantification
 
vDataFilemp_DataFile
 
int m_applyTOF
 
bool m_applyPOI
 
int m_nbTOFBins
 
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
 

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 53 of file oProjectorManager.hh.

Constructor & Destructor Documentation

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 41 of file oProjectorManager.cc.

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 88 of file oProjectorManager.cc.

Here is the call graph for this function:

Member Function Documentation

void oProjectorManager::ApplyBedOffset ( int  a_bed)

Compute the bed offset from the provided bed index and apply it to all projection lines.

Parameters
inta_bed

Definition at line 738 of file oProjectorManager.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

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 143 of file oProjectorManager.cc.

Here is the caller graph for this function:

int oProjectorManager::CheckSPECTAttenuationCompatibility ( const string &  a_pathToAttenuationImage)

A function used to check specific compatibility with SPECT and attenuation correction.

Parameters
conststring& a_pathToAttenuationImage

This function checks that the projector is compatible with SPECT and attenuation correction and that the computation strategy is not image-based; in case the provided path to an attenuation image is not empty.

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

Definition at line 199 of file oProjectorManager.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

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

This function is used to compute system matrix elements from the associated projector or pre-computed system matrix given a vEvent, a bed position and a thread index. As this function returns a pointer to a oProjectionLine (filled from its own oProjectionLine buffers), if a problem occurs, it returns the NULL pointer.

Parameters
vEvent*ap_Event
inta_th
Returns
A pointer to the oProjectionLine containing the system matrix elements.

Definition at line 751 of file oProjectorManager.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

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 206 of file oProjectorManager.hh.

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 199 of file oProjectorManager.hh.

Here is the caller graph for this function:

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 234 of file oProjectorManager.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 130 of file oProjectorManager.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 117 of file oProjectorManager.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

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 435 of file oProjectorManager.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oProjectorManager::ProcessAndSetMask ( FLTNB ap_maskImage)

Process and set the provided mask image for projector masking.

Parameters
FLTNB*ap_maskImage

Definition at line 839 of file oProjectorManager.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

public inline void oProjectorManager::SetComputationStrategy ( int  a_computationStrategy)
inline

Set the computation strategy for the system matrix elements storage.

Parameters
inta_computationStrategy

Definition at line 171 of file oProjectorManager.hh.

Here is the caller graph for this function:

public inline void oProjectorManager::SetDataFile ( vDataFile ap_DataFile)
inline

Set a data file in use to later recover some information from it.

Parameters
vDataFile*ap_DataFile

Definition at line 164 of file oProjectorManager.hh.

Here is the caller graph for this function:

public inline void oProjectorManager::SetImageDimensionsAndQuantification ( oImageDimensionsAndQuantification ap_ImageDimensionsAndQuantification)
inline

Set the image dimensions in use.

Parameters
oImageDimensionsAndQuantification*ap_ImageDimensionsAndQuantification

Definition at line 157 of file oProjectorManager.hh.

Here is the caller graph for this function:

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

Set the backward projection options contained in the provided string.

Parameters
conststring& a_optionsBackward

Definition at line 185 of file oProjectorManager.hh.

Here is the caller graph for this function:

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

Set the common projection options contained in the provided string.

Parameters
conststring& a_optionsCommon

Definition at line 192 of file oProjectorManager.hh.

Here is the caller graph for this function:

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

Set the forward projection options contained in the provided string.

Parameters
conststring& a_optionsForward

Definition at line 178 of file oProjectorManager.hh.

Here is the caller graph for this function:

public inline void oProjectorManager::SetScanner ( vScanner ap_Scanner)
inline

Set the scanner in use.

Parameters
vScanner*ap_Scanner

Definition at line 150 of file oProjectorManager.hh.

Here is the caller graph for this function:

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 715 of file oProjectorManager.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

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 697 of file oProjectorManager.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

public inline void oProjectorManager::SetVerbose ( int  a_verboseLevel)
inline

Set the verbose level.

Parameters
inta_verboseLevel

Definition at line 143 of file oProjectorManager.hh.

Here is the caller graph for this function:

Member Data Documentation

oProjectionLine** oProjectorManager::m2p_ProjectionLines
private

The table of pointers to the oProjectionLines, one per thread

Definition at line 276 of file oProjectorManager.hh.

bool oProjectorManager::m_applyMask
private

Apply the voxel mask to projectors

Definition at line 283 of file oProjectorManager.hh.

bool oProjectorManager::m_applyPOI
private

Boolean that says if we apply POI or not

Definition at line 254 of file oProjectorManager.hh.

int oProjectorManager::m_applyTOF
private

Integer tagging the use of type of TOF use

Definition at line 253 of file oProjectorManager.hh.

string oProjectorManager::m_backwardProjectorName
private

The name of the backward projector provided in the options

Definition at line 265 of file oProjectorManager.hh.

bool oProjectorManager::m_checked
private

Boolean that says if the parameters were checked or not

Definition at line 280 of file oProjectorManager.hh.

int oProjectorManager::m_computationStrategy
private

The integer describing the computation strategy for system matrix elements storage

Definition at line 257 of file oProjectorManager.hh.

string oProjectorManager::m_forwardProjectorName
private

The name of the forward projector provided in the options

Definition at line 264 of file oProjectorManager.hh.

bool oProjectorManager::m_initialized
private

Boolean that says if the manager was initialized or not

Definition at line 282 of file oProjectorManager.hh.

int oProjectorManager::m_nbTOFBins
private

The number of TOF bins in use

Definition at line 255 of file oProjectorManager.hh.

string oProjectorManager::m_optionsBackward
private

The string containing options for the backward projections

Definition at line 260 of file oProjectorManager.hh.

string oProjectorManager::m_optionsCommon
private

The string containing common options for the projectors

Definition at line 262 of file oProjectorManager.hh.

string oProjectorManager::m_optionsForward
private

The string containing options for the forward projections

Definition at line 259 of file oProjectorManager.hh.

bool oProjectorManager::m_useMatchedProjectors
private

Boolean that says if matched projectors are used

Definition at line 274 of file oProjectorManager.hh.

bool oProjectorManager::m_useProjectorBackward
private

Boolean that says if a vProjector is used for backward projections

Definition at line 273 of file oProjectorManager.hh.

bool oProjectorManager::m_useProjectorForward
private

Boolean that says if a vProjector is used for forward projections

Definition at line 272 of file oProjectorManager.hh.

bool oProjectorManager::m_useSystemMatrixBackward
private

Boolean that says if a oSystemMatrix is used for backward projections

Definition at line 271 of file oProjectorManager.hh.

bool oProjectorManager::m_useSystemMatrixForward
private

Boolean that says if a oSystemMatrix is used for forward projections

Definition at line 270 of file oProjectorManager.hh.

int oProjectorManager::m_verbose
private

The verbose level

Definition at line 278 of file oProjectorManager.hh.

vDataFile* oProjectorManager::mp_DataFile
private

Pointer to a vDataFile object in use

Definition at line 251 of file oProjectorManager.hh.

oImageDimensionsAndQuantification* oProjectorManager::mp_ImageDimensionsAndQuantification
private

Pointer to the oImageDimensionsAndQuantification object in use

Definition at line 249 of file oProjectorManager.hh.

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 284 of file oProjectorManager.hh.

vProjector* oProjectorManager::mp_ProjectorBackward
private

The pointer to the vProjector used for backward projections

Definition at line 269 of file oProjectorManager.hh.

vProjector* oProjectorManager::mp_ProjectorForward
private

The pointer to the vProjector used for forward projections

Definition at line 268 of file oProjectorManager.hh.

vScanner* oProjectorManager::mp_Scanner
private

Pointer to the vScanner object in use

Definition at line 247 of file oProjectorManager.hh.

oSystemMatrix* oProjectorManager::mp_SystemMatrixBackward
private

The pointer to the oSystemMatrix used for backward projections

Definition at line 267 of file oProjectorManager.hh.

oSystemMatrix* oProjectorManager::mp_SystemMatrixForward
private

The pointer to the oSystemMatrix used for forward projections

Definition at line 266 of file oProjectorManager.hh.


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