CASToR  1.1
Tomographic Reconstruction (PET/SPECT)
 All Classes Files Functions Variables Typedefs Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
vDeformation Class Referenceabstract

This is the mother class of image-based transformation class. More...

#include <vDeformation.hh>

Inheritance diagram for vDeformation:
Inheritance graph
Collaboration diagram for vDeformation:
Collaboration graph

Public Member Functions

 vDeformation ()
 Constructor of vDeformation. Simply set all data members to default values. More...
 
virtual ~vDeformation ()
 Destructor of vDeformation. More...
 
void SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 Set the image dimensions in use. More...
 
void SetVerbose (int a_verbose)
 Set the verbose level. More...
 
void SetNbTransformations (int a_nbTransformations)
 Set the number of transformation in the data to be performed on the dataset (equal to the number of gates in one frame) More...
 
virtual int CheckParameters ()
 This function is used to check parameters after the latter have been all set using Set functions. More...
 
virtual int CheckSpecificParameters ()=0
 This function is used to check the parameters of the child functions before initialization if required. More...
 
virtual int ReadAndCheckConfigurationFile (const string &a_fileOptions)=0
 This function is used to read options from a configuration file.
It is pure virtual so must be implemented by children. More...
 
virtual int ReadAndCheckOptionsList (const string &a_listOptions)=0
 This function is used to read parameters from a string.
It is pure virtual so must be implemented by children. More...
 
virtual int Initialize ()=0
 This function is used to initialize specific data related to the child deformation model.
It is pure virtual so must be implemented by children. More...
 
virtual void ShowHelp ()=0
 This function is used to print out specific help about the deformation and its options.
It is pure virtual so must be implemented by children. More...
 
virtual int PerformDeformation (oImageSpace *ap_Image, int a_defIdx, int fr, int rimg, int cimg)
 Apply deformations during reconstruction. More...
 
virtual int PerformHistoSensitivityDeformation (oImageSpace *ap_Image, int a_defIdx, int fr, int rimg, int cimg)
 Apply deformations on the sensitivity image during reconstruction in histogram mode. More...
 
virtual int ApplyDeformationsToBackwardImage (oImageSpace *ap_Image, int a_defIdx)
 Apply backward transformation of the backward image to the reference position. More...
 
virtual int ApplyDeformationsToHistoSensitivityImage (oImageSpace *ap_Image, int a_defIdx)
 Apply backward transformations of the sensitivity image to the reference position (histogram mode) More...
 
virtual int PerformSensitivityDeformation (oImageSpace *ap_Image, int a_defDirection, int a_defIdx, int fr, int rg, int cg)
 Apply image deformations during sensitivity image generation for list-mode. More...
 
virtual int ApplyDeformations (FLTNB *ap_inputImage, FLTNB *ap_outputImage, int a_direction, int a_defIdx)=0
 This function prepares the deformation to perform
It is a virtual pure deformation function to be implemented in the child class. More...
 

Protected Attributes

oImageDimensionsAndQuantificationmp_ID
 
int m_verbose
 
int m_nbTransformations
 
int m_checked
 
int m_initialized
 

Detailed Description

This is the mother class of image-based transformation class.

This class is a virtual one, in the sense that it cannot be used on its own because several pure virtual functions belong to it. Its children are implementations of actual deformation models.
Everywhere in the code, this parent class should be used instead of any of its children.
It can be used during the projection/reconstruction process by the oDeformationManager through the use of the Deformation functions that cannot be overloaded:

Definition at line 44 of file vDeformation.hh.

Constructor & Destructor Documentation

vDeformation::vDeformation ( )

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

Definition at line 31 of file vDeformation.cc.

vDeformation::~vDeformation ( )
virtual

Destructor of vDeformation.

Definition at line 51 of file vDeformation.cc.

Member Function Documentation

int vDeformation::ApplyDeformations ( FLTNB ap_inputImage,
FLTNB ap_outputImage,
int  a_direction,
int  a_defIdx 
)
pure virtual

This function prepares the deformation to perform
It is a virtual pure deformation function to be implemented in the child class.

Parameters
ap_inputImage: input image to deform
ap_outputImage: image in which the output of the deformation should be recovered
a_direction: a direction for the deformation to perform (forward or backward)
a_defIdx: index of the deformation
Returns
0 if success, other value otherwise.

Implemented in iDeformationTemplate.

Here is the caller graph for this function:

int vDeformation::ApplyDeformationsToBackwardImage ( oImageSpace ap_Image,
int  a_defIdx 
)
virtual

Apply backward transformation of the backward image to the reference position.

Parameters
ap_Image: required to access the backward image and its deformation backup matrice
a_defIdx: index of the deformation

Loop on frames
Recover any potential data stored in the backup matrice m2p_defTmpBackwardImage

Definition at line 122 of file vDeformation.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int vDeformation::ApplyDeformationsToHistoSensitivityImage ( oImageSpace ap_Image,
int  a_defIdx 
)
virtual

Apply backward transformations of the sensitivity image to the reference position (histogram mode)

Parameters
ap_Image: required to access the backward image and its deformation backup matrice
a_defIdx: index of the deformation

Loop on frames
Recover any potential data stored in the backup matrice m4p_defTmpSensitivityImage

Definition at line 171 of file vDeformation.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int vDeformation::CheckParameters ( )
virtual

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 66 of file vDeformation.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int vDeformation::CheckSpecificParameters ( )
pure virtual

This function is used to check the parameters of the child functions before initialization if required.

It could be overloaded by the child if needed. Default implementation is empty and return 0.

Returns
0 if success, other value otherwise.

Implemented in iDeformationTemplate.

Here is the caller graph for this function:

int vDeformation::Initialize ( )
pure virtual

This function is used to initialize specific data related to the child deformation model.
It is pure virtual so must be implemented by children.

Returns
0 if success, other value otherwise.

Implemented in iDeformationTemplate.

Here is the caller graph for this function:

int vDeformation::PerformDeformation ( oImageSpace ap_Image,
int  a_defIdx,
int  fr,
int  rimg,
int  cimg 
)
virtual

Apply deformations during reconstruction.

Parameters
ap_Image: required to access oImageSpace image matrices
a_defIdx: index of the deformation
fr: frame index
rimg: respiratory image index
cimg: cardiac image index
  1. Recover all the data of the multithreaded backward image matrices in the first one (thread index 0)
    1. Perform backward deformation of the backward image to the reference position with defIdx-1
    2. Add coefficients of the backward image matrice to the temporary backup image matrice & reset backward image
    3. Apply forward deformation of the forward image (backward deformation to the reference position with defIdx-1, and forward deformation with defIdx)
      Returns
      0 if success, positive value otherwise

Definition at line 224 of file vDeformation.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int vDeformation::PerformHistoSensitivityDeformation ( oImageSpace ap_Image,
int  a_defIdx,
int  fr,
int  rimg,
int  cimg 
)
virtual

Apply deformations on the sensitivity image during reconstruction in histogram mode.

Parameters
ap_Image: required to access oImageSpace image matrices
a_defIdx: index of the deformation
fr: frame index
rimg: respiratory image index
cimg: cardiac image index
  1. Recover all the data of the multithreaded sensitivity image matrice in the first one (thread index 0)
    1. Perform backward deformation of the sensitivity image to the reference position with defIdx-1
    2. Add coefficients of the sensitivity image matrice to the temporary backup image matrice & reset sensitivity image
      Returns
      0 if success, positive value otherwise

Definition at line 298 of file vDeformation.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int vDeformation::PerformSensitivityDeformation ( oImageSpace ap_Image,
int  a_defDirection,
int  a_defIdx,
int  fr,
int  rg,
int  cg 
)
virtual

Apply image deformations during sensitivity image generation for list-mode.

Parameters
ap_Image: required to access oImageSpace image matrices
a_defDirection: a direction for the deformation to perform (forward or backward)
a_defIdx: index of the deformation
fr: frame index
rg: respiratory gate index
cg: cardiac gate index

Depending on the deformation direction (forward or backward):
Forward : Perform forward deformation of the forward image to the deformation index position
Backward: Perform backward deformation of the backward image to the reference position

Returns
0 if success, positive value otherwise

Definition at line 361 of file vDeformation.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int vDeformation::ReadAndCheckConfigurationFile ( const string &  a_fileOptions)
pure virtual

This function is used to read options from a configuration file.
It is pure virtual so must be implemented by children.

Parameters
conststring& a_configurationFile : ASCII file containing informations about a deformation model
Returns
0 if success, other value otherwise.

Implemented in iDeformationTemplate.

Here is the caller graph for this function:

int vDeformation::ReadAndCheckOptionsList ( const string &  a_listOptions)
pure virtual

This function is used to read parameters from a string.
It is pure virtual so must be implemented by children.

Parameters
conststring& a_optionsList : a list of parameters separated by commas
Returns
0 if success, other value otherwise.

Implemented in iDeformationTemplate.

Here is the caller graph for this function:

void vDeformation::SetImageDimensionsAndQuantification ( oImageDimensionsAndQuantification ap_ImageDimensionsAndQuantification)
inline

Set the image dimensions in use.

Parameters
oImageDimensionsAndQuantification*ap_ImageDimensionsAndQuantification

Definition at line 69 of file vDeformation.hh.

Here is the caller graph for this function:

void vDeformation::SetNbTransformations ( int  a_nbTransformations)
inline

Set the number of transformation in the data to be performed on the dataset (equal to the number of gates in one frame)

Parameters
a_nbTransformations

Definition at line 84 of file vDeformation.hh.

Here is the caller graph for this function:

void vDeformation::SetVerbose ( int  a_verbose)
inline

Set the verbose level.

Parameters
a_verboseLevel

Definition at line 76 of file vDeformation.hh.

Here is the caller graph for this function:

void vDeformation::ShowHelp ( )
pure virtual

This function is used to print out specific help about the deformation and its options.
It is pure virtual so must be implemented by children.

Implemented in iDeformationTemplate.

Here is the caller graph for this function:

Member Data Documentation

int vDeformation::m_checked
protected

Boolean indicating whether the parameters were checked or not

Definition at line 219 of file vDeformation.hh.

int vDeformation::m_initialized
protected

Boolean indicating whether the manager was initialized or not

Definition at line 220 of file vDeformation.hh.

int vDeformation::m_nbTransformations
protected

Number of transformations to be performed on the dataset (corresponding to the number of gates subsets of the data)

Definition at line 218 of file vDeformation.hh.

int vDeformation::m_verbose
protected

The verbose level

Definition at line 217 of file vDeformation.hh.

oImageDimensionsAndQuantification* vDeformation::mp_ID
protected

Pointer to the oImageDimensionsAndQuantification object in use

Definition at line 216 of file vDeformation.hh.


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