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

This class is designed to manage the image-based deformation part of the reconstruction. More...

#include <oDeformationManager.hh>

Collaboration diagram for oDeformationManager:
Collaboration graph

Public Member Functions

 oDeformationManager ()
 Constructor of oDeformationManager. Simply set all data members to default values. More...
 
 ~oDeformationManager ()
 Destructor of oDeformationManager. Free memory from all allocated tabs. More...
 
int CheckParameters ()
 This function is used to check parameters after the latter have been all set using Set functions. More...
 
int Initialize ()
 Set the flags for the different motion types and instanciate/initialize deformation objects through the ParseOptionsAndInitializeDeformations() private function. More...
 
void InstantiateImageForDeformation (oImageSpace *ap_Image)
 
void DeallocateImageForDeformation (oImageSpace *ap_Image)
 
int InitImageForDeformation (oImageSpace *ap_Image)
 
void SetVerbose (int a_verboseLevel)
 
void SetDataMode (int a_dataMode)
 
void SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 
void SetOptions (const string &a_options)
 
void SetNbTransformations (int a_nbTransformations)
 
void SetMotionType (int a_motionType)
 
bool UseDeformationResp ()
 Indicate if the respiratory motion deformation is enabled. More...
 
bool UseDeformationCard ()
 Indicate if the cardiac motion deformation is enabled. More...
 
bool UseDeformationInv ()
 Indicate if the involuntary patient motion deformation is enabled. More...
 
int GetNbSensImagesRespDeformation (int a_value)
 
int GetNbSensImagesCardDeformation (int a_value)
 
int ApplyDeformationForSensitivityGeneration (oImageSpace *ap_Image, int a_defDirection, int idx, int fr, int rg, int cg)
 
int ApplyDeformationsToBackwardImage (oImageSpace *ap_Image)
 
int PerformDeformation (oImageSpace *ap_Image)
 
int TestDeformationOnImage (FLTNB *ap_inputImage, FLTNB *ap_outputImage, int a_direction, int a_defIdx)
 
 oDeformationManager ()
 
 ~oDeformationManager ()
 
int CheckParameters ()
 
int Initialize ()
 
void InstantiateImageForDeformation (oImageSpace *ap_Image)
 
void DeallocateImageForDeformation (oImageSpace *ap_Image)
 
int InitImageForDeformation (oImageSpace *ap_Image)
 
void SetVerbose (int a_verboseLevel)
 
void SetDataMode (int a_dataMode)
 
void SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 
void SetOptions (const string &a_options)
 
void SetNbTransformations (int a_nbTransformations)
 
void SetMotionType (int a_motionType)
 
bool UseDeformationResp ()
 
bool UseDeformationCard ()
 
bool UseDeformationInv ()
 
int GetNbSensImagesRespDeformation (int a_value)
 
int GetNbSensImagesCardDeformation (int a_value)
 
int ApplyDeformationForSensitivityGeneration (oImageSpace *ap_Image, int a_defDirection, int idx, int fr, int rg, int cg)
 
int ApplyDeformationsToBackwardImage (oImageSpace *ap_Image)
 
int PerformDeformation (oImageSpace *ap_Image)
 
int TestDeformationOnImage (FLTNB *ap_inputImage, FLTNB *ap_outputImage, int a_direction, int a_defIdx)
 

Private Member Functions

int ParseOptionsAndInitializeDeformations ()
 Parse respiratory/cardiac/involuntary patient motion options contained in the previously provided strings. This function is called inside the Initialize() function. More...
 
int ParseOptionsAndInitializeDeformations ()
 

Private Attributes

oImageDimensionsAndQuantificationmp_ID
 
string m_options
 
vDeformationmp_Deformation
 
bool m_UseDeformationResp
 
bool m_UseDeformationCard
 
bool m_UseDeformationIPat
 
int m_curMotIdx
 
int m_nbTransformations
 
int m_verbose
 
int m_dataMode
 
bool m_checked
 
bool m_initialized
 

Detailed Description

This class is designed to manage the image-based deformation 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 PerformDeformation() is called each time the data belongs to a new "gate".
The deformation functions are not multithreaded, therefore the threads are synchronized (inside the main loop of the main algorithm) before performing any image transformation.

Definition at line 50 of file code/include/image/oDeformationManager.hh.

Constructor & Destructor Documentation

◆ oDeformationManager() [1/2]

oDeformationManager::oDeformationManager ( )

Constructor of oDeformationManager. Simply set all data members to default values.

Definition at line 19 of file code/src/image/oDeformationManager.cc.

◆ ~oDeformationManager() [1/2]

oDeformationManager::~oDeformationManager ( )

Destructor of oDeformationManager. Free memory from all allocated tabs.

Definition at line 59 of file code/src/image/oDeformationManager.cc.

◆ oDeformationManager() [2/2]

oDeformationManager::oDeformationManager ( )

◆ ~oDeformationManager() [2/2]

oDeformationManager::~oDeformationManager ( )

Member Function Documentation

◆ ApplyDeformationForSensitivityGeneration() [1/2]

int oDeformationManager::ApplyDeformationForSensitivityGeneration ( oImageSpace ap_Image,
int  a_defDirection,
int  idx,
int  fr,
int  rg,
int  cg 
)

Definition at line 432 of file code/src/image/oDeformationManager.cc.

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

◆ ApplyDeformationForSensitivityGeneration() [2/2]

int oDeformationManager::ApplyDeformationForSensitivityGeneration ( oImageSpace ap_Image,
int  a_defDirection,
int  idx,
int  fr,
int  rg,
int  cg 
)

◆ ApplyDeformationsToBackwardImage() [1/2]

int oDeformationManager::ApplyDeformationsToBackwardImage ( oImageSpace ap_Image)

Definition at line 571 of file code/src/image/oDeformationManager.cc.

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

◆ ApplyDeformationsToBackwardImage() [2/2]

int oDeformationManager::ApplyDeformationsToBackwardImage ( oImageSpace ap_Image)

◆ CheckParameters() [1/2]

int oDeformationManager::CheckParameters ( )

This function is used to check parameters after the latter have been all set using Set functions.

Returns
0 if success, positive value otherwise.

Definition at line 108 of file code/src/image/oDeformationManager.cc.

Here is the caller graph for this function:

◆ CheckParameters() [2/2]

int oDeformationManager::CheckParameters ( )

◆ DeallocateImageForDeformation() [1/2]

void oDeformationManager::DeallocateImageForDeformation ( oImageSpace ap_Image)

Definition at line 348 of file code/src/image/oDeformationManager.cc.

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

◆ DeallocateImageForDeformation() [2/2]

void oDeformationManager::DeallocateImageForDeformation ( oImageSpace ap_Image)

◆ GetNbSensImagesCardDeformation() [1/2]

int oDeformationManager::GetNbSensImagesCardDeformation ( int  a_value)
inline

Definition at line 194 of file code/include/image/oDeformationManager.hh.

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

◆ GetNbSensImagesCardDeformation() [2/2]

int oDeformationManager::GetNbSensImagesCardDeformation ( int  a_value)
inline

Definition at line 194 of file include/image/oDeformationManager.hh.

Here is the call graph for this function:

◆ GetNbSensImagesRespDeformation() [1/2]

int oDeformationManager::GetNbSensImagesRespDeformation ( int  a_value)
inline

Definition at line 184 of file include/image/oDeformationManager.hh.

Here is the call graph for this function:

◆ GetNbSensImagesRespDeformation() [2/2]

int oDeformationManager::GetNbSensImagesRespDeformation ( int  a_value)
inline

Definition at line 184 of file code/include/image/oDeformationManager.hh.

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

◆ Initialize() [1/2]

int oDeformationManager::Initialize ( )

Set the flags for the different motion types and instanciate/initialize deformation objects through the ParseOptionsAndInitializeDeformations() private function.

Returns
0 if success, positive value otherwise.

Definition at line 152 of file code/src/image/oDeformationManager.cc.

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

◆ Initialize() [2/2]

int oDeformationManager::Initialize ( )

◆ InitImageForDeformation() [1/2]

int oDeformationManager::InitImageForDeformation ( oImageSpace ap_Image)

Definition at line 370 of file code/src/image/oDeformationManager.cc.

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

◆ InitImageForDeformation() [2/2]

int oDeformationManager::InitImageForDeformation ( oImageSpace ap_Image)

◆ InstantiateImageForDeformation() [1/2]

void oDeformationManager::InstantiateImageForDeformation ( oImageSpace ap_Image)

◆ InstantiateImageForDeformation() [2/2]

void oDeformationManager::InstantiateImageForDeformation ( oImageSpace ap_Image)

Definition at line 325 of file code/src/image/oDeformationManager.cc.

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

◆ ParseOptionsAndInitializeDeformations() [1/2]

int oDeformationManager::ParseOptionsAndInitializeDeformations ( )
private

Parse respiratory/cardiac/involuntary patient motion options contained in the previously provided strings. This function is called inside the Initialize() function.

Manage the options reading and initialize specific vDeformation
Options are a string containing first the name of the deformation, then either a ':' and a configuration file specific to the deformation

  • or - as many ',' as needed parameters for this deformation.
    Specific pure virtual functions of the vDeformation are used to read parameters and initialize them.
    Returns
    0 if success, positive value otherwise
    Manage the options reading and initialize specific vDeformation
    Options are a string containing first the name of the deformation, then either a ':' and a configuration file specific to the deformation
  • or - as many ',' as needed parameters for this deformation.
    Specific pure virtual functions of the vDeformation are used to read parameters and initialize them.
    Returns
    0 if success, positive value otherwise

Definition at line 208 of file code/src/image/oDeformationManager.cc.

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

◆ ParseOptionsAndInitializeDeformations() [2/2]

int oDeformationManager::ParseOptionsAndInitializeDeformations ( )
private

◆ PerformDeformation() [1/2]

int oDeformationManager::PerformDeformation ( oImageSpace ap_Image)

Definition at line 488 of file code/src/image/oDeformationManager.cc.

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

◆ PerformDeformation() [2/2]

int oDeformationManager::PerformDeformation ( oImageSpace ap_Image)

◆ SetDataMode() [1/2]

void oDeformationManager::SetDataMode ( int  a_dataMode)
inline

Definition at line 124 of file include/image/oDeformationManager.hh.

◆ SetDataMode() [2/2]

void oDeformationManager::SetDataMode ( int  a_dataMode)
inline

Definition at line 124 of file code/include/image/oDeformationManager.hh.

Here is the caller graph for this function:

◆ SetImageDimensionsAndQuantification() [1/2]

void oDeformationManager::SetImageDimensionsAndQuantification ( oImageDimensionsAndQuantification ap_ImageDimensionsAndQuantification)
inline

Definition at line 131 of file code/include/image/oDeformationManager.hh.

Here is the caller graph for this function:

◆ SetImageDimensionsAndQuantification() [2/2]

void oDeformationManager::SetImageDimensionsAndQuantification ( oImageDimensionsAndQuantification ap_ImageDimensionsAndQuantification)
inline

Definition at line 131 of file include/image/oDeformationManager.hh.

◆ SetMotionType() [1/2]

void oDeformationManager::SetMotionType ( int  a_motionType)

◆ SetMotionType() [2/2]

void oDeformationManager::SetMotionType ( int  a_motionType)

Definition at line 81 of file code/src/image/oDeformationManager.cc.

Here is the caller graph for this function:

◆ SetNbTransformations() [1/2]

void oDeformationManager::SetNbTransformations ( int  a_nbTransformations)
inline

Definition at line 147 of file include/image/oDeformationManager.hh.

Here is the call graph for this function:

◆ SetNbTransformations() [2/2]

void oDeformationManager::SetNbTransformations ( int  a_nbTransformations)
inline

Definition at line 147 of file code/include/image/oDeformationManager.hh.

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

◆ SetOptions() [1/2]

void oDeformationManager::SetOptions ( const string &  a_options)
inline

Definition at line 139 of file code/include/image/oDeformationManager.hh.

Here is the caller graph for this function:

◆ SetOptions() [2/2]

void oDeformationManager::SetOptions ( const string &  a_options)
inline

Definition at line 139 of file include/image/oDeformationManager.hh.

◆ SetVerbose() [1/2]

void oDeformationManager::SetVerbose ( int  a_verboseLevel)
inline

Definition at line 116 of file include/image/oDeformationManager.hh.

◆ SetVerbose() [2/2]

void oDeformationManager::SetVerbose ( int  a_verboseLevel)
inline

Definition at line 116 of file code/include/image/oDeformationManager.hh.

Here is the caller graph for this function:

◆ TestDeformationOnImage() [1/2]

int oDeformationManager::TestDeformationOnImage ( FLTNB ap_inputImage,
FLTNB ap_outputImage,
int  a_direction,
int  a_defIdx 
)

◆ TestDeformationOnImage() [2/2]

int oDeformationManager::TestDeformationOnImage ( FLTNB ap_inputImage,
FLTNB ap_outputImage,
int  a_direction,
int  a_defIdx 
)

Definition at line 637 of file code/src/image/oDeformationManager.cc.

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

◆ UseDeformationCard() [1/2]

oDeformationManager::UseDeformationCard ( )
inline

Indicate if the cardiac motion deformation is enabled.

Returns
true if enabled, false otherwise

Definition at line 169 of file code/include/image/oDeformationManager.hh.

Here is the caller graph for this function:

◆ UseDeformationCard() [2/2]

bool oDeformationManager::UseDeformationCard ( )
inline

Definition at line 169 of file include/image/oDeformationManager.hh.

◆ UseDeformationInv() [1/2]

bool oDeformationManager::UseDeformationInv ( )
inline

Definition at line 176 of file include/image/oDeformationManager.hh.

◆ UseDeformationInv() [2/2]

oDeformationManager::UseDeformationInv ( )
inline

Indicate if the involuntary patient motion deformation is enabled.

Returns
true if enabled, false otherwise

Definition at line 176 of file code/include/image/oDeformationManager.hh.

Here is the caller graph for this function:

◆ UseDeformationResp() [1/2]

bool oDeformationManager::UseDeformationResp ( )
inline

Definition at line 162 of file include/image/oDeformationManager.hh.

◆ UseDeformationResp() [2/2]

oDeformationManager::UseDeformationResp ( )
inline

Indicate if the respiratory motion deformation is enabled.

Returns
true if enabled, false otherwise

Definition at line 162 of file code/include/image/oDeformationManager.hh.

Here is the caller graph for this function:

Member Data Documentation

◆ m_checked

bool oDeformationManager::m_checked
private

Boolean indicating whether the parameters were checked or not

Definition at line 318 of file code/include/image/oDeformationManager.hh.

◆ m_curMotIdx

int oDeformationManager::m_curMotIdx
private

Current gate for the motion

Definition at line 308 of file code/include/image/oDeformationManager.hh.

◆ m_dataMode

int oDeformationManager::m_dataMode
private

Data mode (list-mode (=0), histogram (=1)). Recovered from the datafile

Definition at line 316 of file code/include/image/oDeformationManager.hh.

◆ m_initialized

bool oDeformationManager::m_initialized
private

Boolean indicating whether the manager was initialized or not

Definition at line 320 of file code/include/image/oDeformationManager.hh.

◆ m_nbTransformations

int oDeformationManager::m_nbTransformations
private

Number of image-based transformations/deformations

Definition at line 311 of file code/include/image/oDeformationManager.hh.

◆ m_options

string oDeformationManager::m_options
private

The string containing options for the motion correction

Definition at line 299 of file code/include/image/oDeformationManager.hh.

◆ m_UseDeformationCard

bool oDeformationManager::m_UseDeformationCard
private

Flag indicating that transformation for cardiac motion is enabled

Definition at line 304 of file code/include/image/oDeformationManager.hh.

◆ m_UseDeformationIPat

bool oDeformationManager::m_UseDeformationIPat
private

Flag indicating that transformation for involuntary patient motion is enabled

Definition at line 305 of file code/include/image/oDeformationManager.hh.

◆ m_UseDeformationResp

bool oDeformationManager::m_UseDeformationResp
private

Flag indicating that transformation for respiratory motion is enabled

Definition at line 303 of file code/include/image/oDeformationManager.hh.

◆ m_verbose

int oDeformationManager::m_verbose
private

The verbose level

Definition at line 314 of file code/include/image/oDeformationManager.hh.

◆ mp_Deformation

vDeformation * oDeformationManager::mp_Deformation
private

Deformation object for image-based motion

Definition at line 302 of file code/include/image/oDeformationManager.hh.

◆ mp_ID

oImageDimensionsAndQuantification * oDeformationManager::mp_ID
private

Pointer to the oImageDimensionsAndQuantification object in use

Definition at line 297 of file code/include/image/oDeformationManager.hh.


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