![]() |
CASToR
1.0
Tomographic Reconstruction (PET/SPECT)
|
This class performs rigid transformation based on a trilinear interpolation It requires ASCII parameter files containing x,y,z transformation vectors. More...
#include <iDeformationRigid.hh>
Public Member Functions | |
iDeformationRigid () | |
Constructor of iDeformationRigid. Simply set all data members to default values. | |
~iDeformationRigid () | |
Destructor of iDeformationRigid. Free memory from all allocated tabs. | |
int | ReadAndCheckConfigurationFile (const string &a_fileOptions) |
This function is used to read options from a configuration file. | |
int | ReadAndCheckOptionsList (const string &a_listOptions) |
This function is used to read options from a list of options. Throw error by defaut for this method, as a file has to be used for initialization. | |
int | CheckSpecificParameters () |
This function is used to check parameters after the latter have been all set using Set functions. | |
int | Initialize () |
This function is used to initialize specific stuff in the deformation model. | |
void | ShowHelp () |
This function is used to print out specific help about the deformation and its options. | |
int | ApplyDeformations (FLTNB *ap_inputImage, FLTNB *ap_outputImage, int a_direction, int a_defIdx) |
This function prepares the deformation to perform. | |
Private Member Functions | |
int | WarpImage (string a_vectorFileIdx, double *ap_inputImage, double *ap_outputImage) |
This function performs a rigid transformation using x,y,z displacement vectors and trilinear interpolation . | |
int | LoadVectorFiles (string a_vectorFileIdx) |
Load the transformation parameters from an ASCII file provided in argument. | |
Private Attributes | |
vector< string > | m_pathToFwdDeformationFiles |
vector< string > | m_pathToBwdDeformationFiles |
double * | m_OriginalArray |
double * | m_OutputArray |
FLTNB * | mp_vectorX |
FLTNB * | mp_vectorY |
FLTNB * | mp_vectorZ |
This class performs rigid transformation based on a trilinear interpolation It requires ASCII parameter files containing x,y,z transformation vectors.
TODO
Definition at line 22 of file iDeformationRigid.hh.
Constructor of iDeformationRigid. Simply set all data members to default values.
Definition at line 29 of file iDeformationRigid.cc.
Destructor of iDeformationRigid. Free memory from all allocated tabs.
Definition at line 51 of file iDeformationRigid.cc.
int iDeformationRigid::ApplyDeformations | ( | FLTNB * | ap_inputImage, |
FLTNB * | ap_outputImage, | ||
int | a_direction, | ||
int | a_defIdx | ||
) | [virtual] |
This function prepares the deformation to perform.
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 |
1. Selects the right deformation parameters file according to the direction and deformation index argument
2. Copy the image to deform in the buffer image of this class
3. Call the deformation function (WarpImage)
4. Copy back the output of the deformation image to the output image matrice passed in argument
Implements vDeformation.
Definition at line 310 of file iDeformationRigid.cc.
int iDeformationRigid::CheckSpecificParameters | ( | ) | [virtual] |
This function is used to check parameters after the latter have been all set using Set functions.
Implements vDeformation.
Definition at line 234 of file iDeformationRigid.cc.
int iDeformationRigid::Initialize | ( | ) | [virtual] |
This function is used to initialize specific stuff in the deformation model.
Allocate memory for image matrices, and initialize images containing transformation parameters
Implements vDeformation.
Definition at line 263 of file iDeformationRigid.cc.
int iDeformationRigid::LoadVectorFiles | ( | string | a_vectorFileIdx | ) | [private] |
Load the transformation parameters from an ASCII file provided in argument.
a_vectorFileIdx | : deformation parameters file |
Definition at line 461 of file iDeformationRigid.cc.
int iDeformationRigid::ReadAndCheckConfigurationFile | ( | const string & | a_fileOptions | ) | [virtual] |
This function is used to read options from a configuration file.
a_configurationFile |
Implements vDeformation.
Definition at line 124 of file iDeformationRigid.cc.
int iDeformationRigid::ReadAndCheckOptionsList | ( | const string & | a_listOptions | ) | [virtual] |
This function is used to read options from a list of options. Throw error by defaut for this method, as a file has to be used for initialization.
a_optionsList |
Implements vDeformation.
Definition at line 216 of file iDeformationRigid.cc.
void iDeformationRigid::ShowHelp | ( | ) | [virtual] |
This function is used to print out specific help about the deformation and its options.
Implements vDeformation.
Definition at line 76 of file iDeformationRigid.cc.
int iDeformationRigid::WarpImage | ( | string | a_vectorFileIdx, |
double * | ap_inputImage, | ||
double * | ap_outputImage | ||
) | [private] |
This function performs a rigid transformation using x,y,z displacement vectors and trilinear interpolation
.
a_vectorFileIdx | : deformation vector file |
ap_inputImage | : image on which the deformation should be performed |
ap_outputImage | : matrice which recovers the image after deformation |
1. Load the X,Y,Z transformation vectors from the file passed in argument 2. Loop on the voxels and compute the new voxels value using trilinear interpolation
Definition at line 370 of file iDeformationRigid.cc.
double* iDeformationRigid::m_OriginalArray [private] |
Image matrice to get the input image for deformation
Definition at line 128 of file iDeformationRigid.hh.
double* iDeformationRigid::m_OutputArray [private] |
Image matrice to recover the output image after deformation
Definition at line 129 of file iDeformationRigid.hh.
vector<string> iDeformationRigid::m_pathToBwdDeformationFiles [private] |
Containers of the location of backward deformation file. Nb of elements should be equal to the number of transformations 'm_nbTransformations'
Definition at line 126 of file iDeformationRigid.hh.
vector<string> iDeformationRigid::m_pathToFwdDeformationFiles [private] |
Containers of the location of forward deformation file. Nb of elements should be equal to the number of transformations 'm_nbTransformations'
Definition at line 123 of file iDeformationRigid.hh.
FLTNB* iDeformationRigid::mp_vectorX [private] |
Image containing transformation parameters on the X-axis
Definition at line 130 of file iDeformationRigid.hh.
FLTNB* iDeformationRigid::mp_vectorY [private] |
Image containing transformation parameters on the Y-axis
Definition at line 131 of file iDeformationRigid.hh.
FLTNB* iDeformationRigid::mp_vectorZ [private] |
Image containing transformation parameters on the Z-axis
Definition at line 132 of file iDeformationRigid.hh.