CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
include/image/iDeformationRigid.hh
Go to the documentation of this file.
1 
8 #ifndef IDEFORMATIONRIGID_HH
9 #define IDEFORMATIONRIGID_HH 1
10 
11 #include "oImageSpace.hh"
12 #include "sAddonManager.hh"
13 #include "vDeformation.hh"
14 #include "oMatrix.hh"
15 
22 class iDeformationRigid : public vDeformation
23 {
24  // -----------------------------------------------------------------------------------------
25  // Constructor & Destructor
26  public:
37 
38 
39  // -----------------------------------------------------------------------------------------
40  // Public member functions
41  public:
42  // Function for automatic insertion (put the class name as the parameters and do not add semi-colon at the end of the line)
50  int ReadAndCheckConfigurationFile(const string& a_fileOptions);
58  int ReadAndCheckOptionsList(const string& a_listOptions);
72  int Initialize();
77  void ShowHelp();
91  int ApplyDeformations(FLTNB* ap_inputImage, FLTNB* ap_outputImage, int a_direction, int a_defIdx);
92 
93 
94  // -----------------------------------------------------------------------------------------
95  // Private member functions
96  private:
110  int TransformImage(int a_direction, int a_defIdx, HPFLTNB *ap_inputImage, HPFLTNB *ap_outputImage);
111 
118 
131  int SetRotationMatrix(oMatrix* apRotMtx, FLTNB a_ang1, FLTNB a_ang2, FLTNB a_ang3, string a_cvt);
132 
133  //int Tlerp(HPFLTNB *ap_inputImage, HPFLTNB *ap_outputImage, uint32_t iov, uint32_t iiv, FLTNB dX, FLTNB dY, FLTNB dZ);
134 
135  // -----------------------------------------------------------------------------------------
136  // Data members
137  private:
138  vector<string>
141  vector<string>
146  HPFLTNB* mp_tX;
147  HPFLTNB* mp_tY;
148  HPFLTNB* mp_tZ;
149  HPFLTNB* mp_rA;
150  HPFLTNB* mp_rB;
151  HPFLTNB* mp_rC;
152  oMatrix** m2p_FTmtx;
153  oMatrix** m2p_BTmtx;
154  string m_rotConvention;
155  bool m_cmpTransfoFlag;
157 };
158 
159 // Class for automatic insertion (set here the visible image deformation's name, put the class name as the parameters and do not add semi-colon at the end of the line)
160 CLASS_DEFORMATION(deformationRigid,iDeformationRigid)
161 
162 #endif
void ShowHelp()
This function is used to print out specific help about the deformation and its options.
This class performs rigid transformation based on a trilinear interpolation It requires ASCII paramet...
~iDeformationRigid()
Destructor of iDeformationRigid. Free memory from all allocated tabs.
Declaration of class oImageSpace.
int ReadAndCheckConfigurationFile(const string &a_fileOptions)
Declaration of class vDeformation.
#define FUNCTION_DEFORMATION(CLASS)
int ReadAndCheckOptionsList(const string &a_listOptions)
int CheckSpecificParameters()
This function is used to check parameters after the latter have been all set using Set functions...
int TransformImage(int a_direction, int a_defIdx, HPFLTNB *ap_inputImage, HPFLTNB *ap_outputImage)
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 rota...
int ComputeTransformationMatrices()
Initialize transformation matrices from parameters.
This is the mother class of image-based transformation class.
#define CLASS_DEFORMATION(NAME, CLASS)
iDeformationRigid()
Constructor of iDeformationRigid. Simply set all data members to default values.
Structure designed for basic matrices operations.
int ApplyDeformations(FLTNB *ap_inputImage, FLTNB *ap_outputImage, int a_direction, int a_defIdx)
int Initialize()
This function is used to initialize specific stuff in the deformation model.