CASToR  1.0
Tomographic Reconstruction (PET/SPECT)
Public Member Functions | Private Member Functions | Private Attributes
oSensitivityGenerator Class Reference

This class is designed to manage the computation of the sensitivity image. More...

#include <oSensitivityGenerator.hh>

Collaboration diagram for oSensitivityGenerator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 oSensitivityGenerator ()
 The constructor of oSensitivityGenerator.
 ~oSensitivityGenerator ()
 The destructor of oSensitivityGenerator.
int CheckParameters ()
 A public function used to check the parameters settings.
int Initialize ()
 A public function used to initialize the sensitivity generator.
int Launch ()
 A public function used to launch the sensitivity generator (compute the sensitivity image)
string GetPathToSensitivityImage ()
 This function return the path to the sensitivity image.
void SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 This function is used to set the pointer to the oImageDimensionsAndQuantification in use.
void SetImageSpace (oImageSpace *ap_ImageSpace)
 This function is used to set the pointer to the oImageSpace in use.
void SetScanner (vScanner *ap_Scanner)
 This function is used to set the pointer to the vScanner in use.
void SetProjectorManager (oProjectorManager *ap_ProjectorManager)
 This function is used to set the pointer to the oProjectorManager in use.
void SetImageConvolverManager (oImageConvolverManager *ap_ImageConvolverManager)
 This function is used to set the pointer to the oImageConvolverManager in use.
void SetDeformationManager (oDeformationManager *ap_DeformationManager)
 This function is used to set the pointer to the oDeformationManager in use.
void SetDataFile (vDataFile **a2p_DataFile)
 This function is used to set the pointer to the vDataFile array in use.
void SetPathToNormalizationFileName (vector< string > ap_pathToNormalizationFileName)
 This function is used to set the path to the normalization file names.
void SetNormalizationDataFile (vDataFile ***a3p_NormalizationDataFile)
 This function is used to set the pointer to the vDataFile array in use for normalization.
void SetPathToAttenuationImage (string a_pathToAttenuationImage)
 This function is used to set the path to the attenuation image.
void SetNumberOfAtnGateImages (int a_nbAtnRespGateImages, int a_nbAtnCardGateImages)
void SetGPUflag (bool a_flagGPU)
 This function is used to set the GPU flag; do we use GPU or not.
void SetVerbose (int a_verboseLevel)

Private Member Functions

int InitializeAttenuationFiles ()
 Initialize the attenuation images provided for sensitivity computation.
int InitializeNormalizationFiles ()
 Initialize the normalization datafiles provided for sensitivity computation.
int LaunchCPU ()
 Launch the computation of the sensitivity image (CPU version)
int ComputeSensitivityFromNormalizationFile (int a_bed)
 Launch the computation of the sensitivity image for this bed, based on normalization data files.
int ComputeSensitivityFromScanner (int a_bed)
 Launch the computation of the sensitivity image for this bed, based on a loop over all scanner elements.
int ProcessThisLine (oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_frame, int a_respGate, int a_cardGate, int a_thread)
 This function manages the computation of the sensitivity contribution of the projection line provided as a parameter.

Private Attributes

string m_pathToSensitivityImage
oImageDimensionsAndQuantificationmp_ImageDimensionsAndQuantification
oImageSpacemp_ImageSpace
vScannermp_Scanner
oProjectorManagermp_ProjectorManager
oImageConvolverManagermp_ImageConvolverManager
oDeformationManagermp_DeformationManager
vDataFile ** m2p_DataFile
vector< string > mp_pathToNormalizationFileName
vDataFile *** m3p_NormalizationDataFile
bool m_OneNormalizationFileForAllBeds
bool m_OneNormalizationFileForAllFrames
string m_pathToAttenuationImage
bool m_attenuationFlag
bool m_forwardProjectAttenuation
int m_nbAtnRespGateImages
int m_nbAtnCardGateImages
uint64_t * mp_lineCounter
bool m_flagGPU
int m_verbose
bool m_checked
bool m_initialized

Detailed Description

This class is designed to manage the computation of the sensitivity image.

The sensitivity computation can be done in two ways:
(i) using a normalization data file if provided, where the loop for computation will be done on all events included in the datafile, with included normalization factors;
(ii) if no normalization file is provided, using a loop on all scanner elements.
A mumap in cm-1 can also be provided in order to include the attenuation correction in the sensitivity image.

Definition at line 34 of file oSensitivityGenerator.hh.


Constructor & Destructor Documentation

The constructor of oSensitivityGenerator.

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 27 of file oSensitivityGenerator.cc.

The destructor of oSensitivityGenerator.

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 59 of file oSensitivityGenerator.cc.

Here is the call graph for this function:


Member Function Documentation

A public 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 83 of file oSensitivityGenerator.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

Launch the computation of the sensitivity image for this bed, based on normalization data files.

Parameters:
inta_bed

The loop is done over the events of the normalization data files, which represent the collection of all data channels for the different dynamic frames.

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

Definition at line 544 of file oSensitivityGenerator.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

Launch the computation of the sensitivity image for this bed, based on a loop over all scanner elements.

Parameters:
inta_bed
Returns:
An integer reflecting the computation status; 0 if no problem, another value otherwise.

Definition at line 673 of file oSensitivityGenerator.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

This function return the path to the sensitivity image.

Returns:
m_pathToSensitivityImage

Definition at line 914 of file oSensitivityGenerator.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

A public function used to initialize the sensitivity generator.

This function does not take any parameter and is used to initialize everything that should be initialized.

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

Definition at line 163 of file oSensitivityGenerator.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

Initialize the attenuation images provided for sensitivity computation.

This function is called by the Initialize() function. It checks and reads the provided attenuation images to be taken into account for sensitivity computation.

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

Definition at line 399 of file oSensitivityGenerator.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

Initialize the normalization datafiles provided for sensitivity computation.

This function is called by the Initialize() function. It checks and reads the provided normalization datafiles to be taken into account for sensitivity computation.

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

Definition at line 229 of file oSensitivityGenerator.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

A public function used to launch the sensitivity generator (compute the sensitivity image)

This function does not take any parameter and is used to launch the computation of the sensitivity image. In fact, it simply switches between the CPU and GPU versions of the function (which are private).

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

Definition at line 467 of file oSensitivityGenerator.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

Launch the computation of the sensitivity image (CPU version)

This function calls either the ComputeSensitivityFromNormalizationFile() or the ComputeSensitivityFromScanner() function based on normalization data files provided or not.
It does the loop over all bed positions.

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

Definition at line 485 of file oSensitivityGenerator.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oSensitivityGenerator::ProcessThisLine ( oProjectionLine ap_Line,
vEvent ap_Event,
int  a_bed,
int  a_frame,
int  a_respGate,
int  a_cardGate,
int  a_thread 
) [private]

This function manages the computation of the sensitivity contribution of the projection line provided as a parameter.

Parameters:
oProjectionLine*ap_Line
vEvent*ap_Event
inta_bed
inta_frame
inta_respGate
inta_cardGate
inta_thread

For the given line, the given event, the current bed, frame, respiratory and cardiac gates, the function performs the forward projectio into the attenuation images (if any), compute the sensitivity contribution, and back-projects this contribution into the sensitivity image.

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

Definition at line 846 of file oSensitivityGenerator.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

public inline void oSensitivityGenerator::SetDataFile ( vDataFile **  a2p_DataFile) [inline]

This function is used to set the pointer to the vDataFile array in use.

Parameters:
vDataFile**a2p_DataFile

Definition at line 213 of file oSensitivityGenerator.hh.

Here is the caller graph for this function:

public inline void oSensitivityGenerator::SetDeformationManager ( oDeformationManager ap_DeformationManager) [inline]

This function is used to set the pointer to the oDeformationManager in use.

Parameters:
oDeformationManager*ap_DeformationManager

Definition at line 206 of file oSensitivityGenerator.hh.

Here is the caller graph for this function:

public inline void oSensitivityGenerator::SetGPUflag ( bool  a_flagGPU) [inline]

This function is used to set the GPU flag; do we use GPU or not.

Parameters:
boola_flagGPU

Definition at line 249 of file oSensitivityGenerator.hh.

Here is the caller graph for this function:

public inline void oSensitivityGenerator::SetImageConvolverManager ( oImageConvolverManager ap_ImageConvolverManager) [inline]

This function is used to set the pointer to the oImageConvolverManager in use.

Parameters:
oImageConvolverManager*ap_ImageConvolverManager

Definition at line 199 of file oSensitivityGenerator.hh.

Here is the caller graph for this function:

public inline void oSensitivityGenerator::SetImageDimensionsAndQuantification ( oImageDimensionsAndQuantification ap_ImageDimensionsAndQuantification) [inline]

This function is used to set the pointer to the oImageDimensionsAndQuantification in use.

Parameters:
oImageDimensionsAndQuantification*ap_ImageDimensionsAndQuantification

Definition at line 171 of file oSensitivityGenerator.hh.

Here is the caller graph for this function:

public inline void oSensitivityGenerator::SetImageSpace ( oImageSpace ap_ImageSpace) [inline]

This function is used to set the pointer to the oImageSpace in use.

Parameters:
oImageSpace*ap_ImageSpace

Definition at line 178 of file oSensitivityGenerator.hh.

Here is the caller graph for this function:

public inline void oSensitivityGenerator::SetNormalizationDataFile ( vDataFile ***  a3p_NormalizationDataFile) [inline]

This function is used to set the pointer to the vDataFile array in use for normalization.

Parameters:
vDataFile**a3p_NormalizationDataFile

Definition at line 227 of file oSensitivityGenerator.hh.

void oSensitivityGenerator::SetNumberOfAtnGateImages ( int  a_nbAtnRespGateImages,
int  a_nbAtnCardGateImages 
) [inline]

Definition at line 242 of file oSensitivityGenerator.hh.

Here is the caller graph for this function:

public inline void oSensitivityGenerator::SetPathToAttenuationImage ( string  a_pathToAttenuationImage) [inline]

This function is used to set the path to the attenuation image.

Parameters:
stringa_pathToAttenuationImage

Definition at line 234 of file oSensitivityGenerator.hh.

Here is the caller graph for this function:

public inline void oSensitivityGenerator::SetPathToNormalizationFileName ( vector< string >  ap_pathToNormalizationFileName) [inline]

This function is used to set the path to the normalization file names.

Parameters:
vector<string>ap_pathToNormalizationFileName

Definition at line 220 of file oSensitivityGenerator.hh.

Here is the caller graph for this function:

public inline void oSensitivityGenerator::SetProjectorManager ( oProjectorManager ap_ProjectorManager) [inline]

This function is used to set the pointer to the oProjectorManager in use.

Parameters:
oProjectorManager*ap_ProjectorManager

Definition at line 192 of file oSensitivityGenerator.hh.

Here is the caller graph for this function:

public inline void oSensitivityGenerator::SetScanner ( vScanner ap_Scanner) [inline]

This function is used to set the pointer to the vScanner in use.

Parameters:
vScanner*ap_Scanner

Definition at line 185 of file oSensitivityGenerator.hh.

Here is the caller graph for this function:

void oSensitivityGenerator::SetVerbose ( int  a_verboseLevel) [inline]

Definition at line 256 of file oSensitivityGenerator.hh.

Here is the caller graph for this function:


Member Data Documentation

Pointer to the array of vDataFile objects

Definition at line 271 of file oSensitivityGenerator.hh.

Pointer to the double array of vDataFile objects for normalization

Definition at line 273 of file oSensitivityGenerator.hh.

Flag to say if an attenuation image has to been provided

Definition at line 277 of file oSensitivityGenerator.hh.

Boolean that says if the parameters were checked or not

Definition at line 284 of file oSensitivityGenerator.hh.

Do we use GPU or not (default=false)

Definition at line 282 of file oSensitivityGenerator.hh.

Flag to say that we need to forward project the provided attenuation map (many conditions for that)

Definition at line 278 of file oSensitivityGenerator.hh.

Boolean that says if the projector was initialized or not

Definition at line 285 of file oSensitivityGenerator.hh.

Number of attenuation images corresponding to the cardiac gates

Definition at line 280 of file oSensitivityGenerator.hh.

Number of attenuation images corresponding to the respiratory gates

Definition at line 279 of file oSensitivityGenerator.hh.

A boolean to specify if only one normalization file has been provided for all beds

Definition at line 274 of file oSensitivityGenerator.hh.

A boolean to specify if only one normalization file has been provided for all frames

Definition at line 275 of file oSensitivityGenerator.hh.

String of the path to the attenuation images

Definition at line 276 of file oSensitivityGenerator.hh.

The actual path to the created sensitivity image

Definition at line 257 of file oSensitivityGenerator.hh.

Verbosity (default=-1)

Definition at line 283 of file oSensitivityGenerator.hh.

Pointer to the Deformation Manager object

Definition at line 270 of file oSensitivityGenerator.hh.

Pointer to the Image Convolver Manager object

Definition at line 269 of file oSensitivityGenerator.hh.

Pointer to the oImageDimensionsAndQuantification object

Definition at line 265 of file oSensitivityGenerator.hh.

Pointer to the Image Space object

Definition at line 266 of file oSensitivityGenerator.hh.

Counters of the number of effectively projected lines, 1 per thread

Definition at line 281 of file oSensitivityGenerator.hh.

Vector of normalization file names

Definition at line 272 of file oSensitivityGenerator.hh.

Pointer to the Projector Manager object

Definition at line 268 of file oSensitivityGenerator.hh.

Pointer to the Scanner object

Definition at line 267 of file oSensitivityGenerator.hh.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Defines