CASToR
3.0
Tomographic Reconstruction (PET/SPECT/CT)
|
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. More... | |
~iDeformationRigid () | |
Destructor of iDeformationRigid. Free memory from all allocated tabs. More... | |
int | ReadAndCheckConfigurationFile (const string &a_fileOptions) |
This function is used to read options from a configuration file. More... | |
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. More... | |
int | CheckSpecificParameters () |
This function is used to check parameters after the latter have been all set using Set functions. More... | |
int | Initialize () |
This function is used to initialize specific stuff in the deformation model. More... | |
void | ShowHelp () |
This function is used to print out specific help about the deformation and its options. More... | |
int | ApplyDeformations (FLTNB *ap_inputImage, FLTNB *ap_outputImage, int a_direction, int a_defIdx) |
This function prepares the deformation to perform. More... | |
Public Member Functions inherited from vDeformation | |
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 | PerformDeformation (oImageSpace *ap_Image, int a_defIdx, int a_fr, int a_rimg, int a_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_fr, int a_defIdx) |
Apply backward transformation of the backward image to the reference position. More... | |
virtual int | ApplyDeformationsToHistoSensitivityImage (oImageSpace *ap_Image, int a_fr, 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... | |
int | Tlerp (HPFLTNB *ap_inputImage, HPFLTNB *ap_outputImage, uint32_t iov, uint32_t iiv, FLTNB dX, FLTNB dY, FLTNB dZ) |
Private Member Functions | |
int | TransformImage (int a_direction, int a_defIdx, HPFLTNB *ap_inputImage, HPFLTNB *ap_outputImage) |
This function performs a rigid transformation using x,y,z displacement vectors and trilinear interpolation . More... | |
int | ComputeTransformationMatrices () |
Initialize transformation matrices from parameters. More... | |
int | SetRotationMatrix (oMatrix *apRotMtx, FLTNB a_ang1, FLTNB a_ang2, FLTNB a_ang3, string a_cvt) |
This function set the rotation matrix passed in parameter with the provided angles in radian and rotation convention. More... | |
Private Attributes | |
vector< string > | m_pathToFwdDeformationFiles |
vector< string > | m_pathToBwdDeformationFiles |
HPFLTNB * | mp_OriginalArray |
HPFLTNB * | mp_OutputArray |
HPFLTNB * | mp_tX |
HPFLTNB * | mp_tY |
HPFLTNB * | mp_tZ |
HPFLTNB * | mp_rA |
HPFLTNB * | mp_rB |
HPFLTNB * | mp_rC |
oMatrix ** | m2p_FTmtx |
oMatrix ** | m2p_BTmtx |
string | m_rotConvention |
bool | m_cmpTransfoFlag |
Additional Inherited Members | |
Protected Attributes inherited from vDeformation | |
oImageDimensionsAndQuantification * | mp_ID |
int | m_verbose |
int | m_nbTransformations |
int | m_checked |
int | m_initialized |
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 44 of file iDeformationRigid.hh.
iDeformationRigid::iDeformationRigid | ( | ) |
Constructor of iDeformationRigid. Simply set all data members to default values.
Definition at line 40 of file iDeformationRigid.cc.
iDeformationRigid::~iDeformationRigid | ( | ) |
Destructor of iDeformationRigid. Free memory from all allocated tabs.
Definition at line 67 of file iDeformationRigid.cc.
|
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 |
Implements vDeformation.
Definition at line 500 of file iDeformationRigid.cc.
|
virtual |
This function is used to check parameters after the latter have been all set using Set functions.
Implements vDeformation.
Definition at line 432 of file iDeformationRigid.cc.
|
private |
Initialize transformation matrices from parameters.
Definition at line 315 of file iDeformationRigid.cc.
|
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 463 of file iDeformationRigid.cc.
|
virtual |
This function is used to read options from a configuration file.
a_configurationFile |
Implements vDeformation.
Definition at line 158 of file iDeformationRigid.cc.
|
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 246 of file iDeformationRigid.cc.
|
private |
This function set the rotation matrix passed in parameter with the provided angles in radian and rotation convention.
apRotMtx | : Rotation oMatrix to initialize |
a_ang1 | : 1st rotation angle (rad) |
a_ang2 | : 2nd rotation angle (rad) |
a_ang3 | : 3rd rotation angle (rad) |
a_cvt | : rotation convention (must be any combinations of 'x', 'y', and 'z'. (Default: xyz) ) |
Definition at line 642 of file iDeformationRigid.cc.
|
virtual |
This function is used to print out specific help about the deformation and its options.
Implements vDeformation.
Definition at line 105 of file iDeformationRigid.cc.
|
private |
This function performs a rigid transformation using x,y,z displacement vectors and trilinear interpolation
.
a_direction | : direction of deformation |
a_defIdx | : index of deformation |
ap_inputImage | : image on which the deformation should be performed |
ap_outputImage | : matrice which recovers the image after deformation |
Definition at line 552 of file iDeformationRigid.cc.
|
private |
Backward transformation matrix
Definition at line 175 of file iDeformationRigid.hh.
|
private |
Forward transformation matrix
Definition at line 174 of file iDeformationRigid.hh.
|
private |
Flag defining if transformations from reference to each position must be computed (provided transformation parameters from one position to the next one, default) or not (already computed by the user)
Definition at line 177 of file iDeformationRigid.hh.
|
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 164 of file iDeformationRigid.hh.
|
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 161 of file iDeformationRigid.hh.
|
private |
Convention for rotation. Default : XYZ
Definition at line 176 of file iDeformationRigid.hh.
|
private |
Image matrice to get the input image for deformation
Definition at line 166 of file iDeformationRigid.hh.
|
private |
Image matrice to recover the output image after deformation
Definition at line 167 of file iDeformationRigid.hh.
|
private |
First rotation
Definition at line 171 of file iDeformationRigid.hh.
|
private |
Second rotation
Definition at line 172 of file iDeformationRigid.hh.
|
private |
Third rotation
Definition at line 173 of file iDeformationRigid.hh.
|
private |
Translation on the X-axis
Definition at line 168 of file iDeformationRigid.hh.
|
private |
Translation on the Y-axis
Definition at line 169 of file iDeformationRigid.hh.
|
private |
Translation on the Z-axis
Definition at line 170 of file iDeformationRigid.hh.