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

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

#include <vDeformation.hh>

Inheritance diagram for vDeformation:
Inheritance graph
[legend]
Collaboration diagram for vDeformation:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 vDeformation ()
 Constructor of vDeformation. Simply set all data members to default values.
virtual ~vDeformation ()
 Destructor of vDeformation.
void SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 Set the image dimensions in use.
void SetVerbose (int a_verbose)
 Set the verbose level.
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)
virtual int CheckParameters ()
 This function is used to check parameters after the latter have been all set using Set functions.
virtual int CheckSpecificParameters ()=0
 This function is used to check the parameters of the child functions before initialization if required.
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.
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.
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.
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.
virtual int ApplyDeformationsToForwardImage (oImageSpace *ap_Image, int a_defIdx, int fr, int rimg, int cimg)
 Apply initial deformations on the forwardImage before loop on events.
virtual int PerformDeformation (oImageSpace *ap_Image, int a_defIdx, int fr, int rimg, int cimg)
 Apply deformations during reconstruction.
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.
virtual int ApplyDeformationsToBackwardImage (oImageSpace *ap_Image, int a_defIdx)
 Apply backward transformation of the backward image to the reference position.
virtual int ApplyDeformationsToHistoSensitivityImage (oImageSpace *ap_Image, int a_defIdx)
 Apply backward transformations of the sensitivity image to the reference position (histogram mode)
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.
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.

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:

All children must implement the following pure virtual functions:

Definition at line 44 of file vDeformation.hh.


Constructor & Destructor Documentation

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

Definition at line 31 of file vDeformation.cc.

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 iDeformationElastic, iDeformationRigid, and 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

Returns:
0 if success, positive value otherwise

Definition at line 158 of file vDeformation.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int vDeformation::ApplyDeformationsToForwardImage ( oImageSpace ap_Image,
int  a_defIdx,
int  fr,
int  rimg,
int  cimg 
) [virtual]

Apply initial deformations on the forwardImage before loop on events.

Parameters:
ap_Image: required to access the forward image
a_defIdx: index of the deformation
fr: frame index
rimg: respiratory image index
cimg: cardiac image index
Returns:
0 if success, positive value otherwise

Definition at line 121 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

Returns:
0 if success, positive value otherwise

Definition at line 207 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 iDeformationElastic, iDeformationTemplate, and iDeformationRigid.

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 iDeformationElastic, iDeformationTemplate, and iDeformationRigid.

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)
2. Perform backward deformation of the backward image to the reference position with defIdx-1
3. Add coefficients of the backward image matrice to the temporary backup image matrice & reset backward image
4. 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 260 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)
2. Perform backward deformation of the sensitivity image to the reference position with defIdx-1
3. 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 341 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 404 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 iDeformationElastic, iDeformationTemplate, and iDeformationRigid.

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 iDeformationElastic, iDeformationTemplate, and iDeformationRigid.

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 iDeformationElastic, iDeformationTemplate, and iDeformationRigid.

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 231 of file vDeformation.hh.

int vDeformation::m_initialized [protected]

Boolean indicating whether the manager was initialized or not

Definition at line 232 of file vDeformation.hh.

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

Definition at line 230 of file vDeformation.hh.

int vDeformation::m_verbose [protected]

The verbose level

Definition at line 229 of file vDeformation.hh.

Pointer to the oImageDimensionsAndQuantification object in use

Definition at line 228 of file vDeformation.hh.


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