![]() |
CASToR
1.0
Tomographic Reconstruction (PET/SPECT)
|
This is the mother class of image-based transformation class. More...
#include <vDeformation.hh>
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 | |
oImageDimensionsAndQuantification * | mp_ID |
int | m_verbose |
int | m_nbTransformations |
int | m_checked |
int | m_initialized |
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 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.
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.
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 |
Implemented in iDeformationElastic, iDeformationRigid, and iDeformationTemplate.
int vDeformation::ApplyDeformationsToBackwardImage | ( | oImageSpace * | ap_Image, |
int | a_defIdx | ||
) | [virtual] |
Apply backward transformation of the backward image to the reference position.
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 158 of file vDeformation.cc.
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.
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 |
Definition at line 121 of file vDeformation.cc.
int vDeformation::ApplyDeformationsToHistoSensitivityImage | ( | oImageSpace * | ap_Image, |
int | a_defIdx | ||
) | [virtual] |
Apply backward transformations of the sensitivity image to the reference position (histogram mode)
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 207 of file vDeformation.cc.
int vDeformation::CheckParameters | ( | ) | [virtual] |
This function is used to check parameters after the latter have been all set using Set functions.
Definition at line 66 of file vDeformation.cc.
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.
Implemented in iDeformationElastic, iDeformationTemplate, and iDeformationRigid.
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.
Implemented in iDeformationElastic, iDeformationTemplate, and iDeformationRigid.
int vDeformation::PerformDeformation | ( | oImageSpace * | ap_Image, |
int | a_defIdx, | ||
int | fr, | ||
int | rimg, | ||
int | cimg | ||
) | [virtual] |
Apply deformations during reconstruction.
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)
Definition at line 260 of file vDeformation.cc.
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.
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
Definition at line 341 of file vDeformation.cc.
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.
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
Definition at line 404 of file vDeformation.cc.
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.
const | string& a_configurationFile : ASCII file containing informations about a deformation model |
Implemented in iDeformationElastic, iDeformationTemplate, and iDeformationRigid.
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.
const | string& a_optionsList : a list of parameters separated by commas |
Implemented in iDeformationElastic, iDeformationTemplate, and iDeformationRigid.
void vDeformation::SetImageDimensionsAndQuantification | ( | oImageDimensionsAndQuantification * | ap_ImageDimensionsAndQuantification | ) | [inline] |
Set the image dimensions in use.
oImageDimensionsAndQuantification* | ap_ImageDimensionsAndQuantification |
Definition at line 69 of file vDeformation.hh.
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)
a_nbTransformations |
Definition at line 84 of file vDeformation.hh.
void vDeformation::SetVerbose | ( | int | a_verbose | ) | [inline] |
Set the verbose level.
a_verboseLevel |
Definition at line 76 of file vDeformation.hh.
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.
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.
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 230 of file vDeformation.hh.
int vDeformation::m_verbose [protected] |
The verbose level
Definition at line 229 of file vDeformation.hh.
oImageDimensionsAndQuantification* vDeformation::mp_ID [protected] |
Pointer to the oImageDimensionsAndQuantification object in use
Definition at line 228 of file vDeformation.hh.