CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
iDeformationRigid.hh
Go to the documentation of this file.
1 /*
2 This file is part of CASToR.
3 
4  CASToR is free software: you can redistribute it and/or modify it under the
5  terms of the GNU General Public License as published by the Free Software
6  Foundation, either version 3 of the License, or (at your option) any later
7  version.
8 
9  CASToR is distributed in the hope that it will be useful, but WITHOUT ANY
10  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12  details.
13 
14  You should have received a copy of the GNU General Public License along with
15  CASToR (in file GNU_GPL.TXT). If not, see <http://www.gnu.org/licenses/>.
16 
17 Copyright 2017-2019 all CASToR contributors listed below:
18 
19  --> Didier BENOIT, Claude COMTAT, Marina FILIPOVIC, Thibaut MERLIN, Mael MILLARDET, Simon STUTE, Valentin VIELZEUF
20 
21 This is CASToR version 3.0.
22 */
23 
30 #ifndef IDEFORMATIONRIGID_HH
31 #define IDEFORMATIONRIGID_HH 1
32 
33 #include "oImageSpace.hh"
34 #include "sAddonManager.hh"
35 #include "vDeformation.hh"
36 #include "oMatrix.hh"
37 
45 {
46  // -----------------------------------------------------------------------------------------
47  // Constructor & Destructor
48  public:
59 
60 
61  // -----------------------------------------------------------------------------------------
62  // Public member functions
63  public:
64  // Function for automatic insertion (put the class name as the parameters and do not add semi-colon at the end of the line)
72  int ReadAndCheckConfigurationFile(const string& a_fileOptions);
80  int ReadAndCheckOptionsList(const string& a_listOptions);
94  int Initialize();
99  void ShowHelp();
113  int ApplyDeformations(FLTNB* ap_inputImage, FLTNB* ap_outputImage, int a_direction, int a_defIdx);
114 
115 
116  // -----------------------------------------------------------------------------------------
117  // Private member functions
118  private:
132  int TransformImage(int a_direction, int a_defIdx, HPFLTNB *ap_inputImage, HPFLTNB *ap_outputImage);
133 
140 
153  int SetRotationMatrix(oMatrix* apRotMtx, FLTNB a_ang1, FLTNB a_ang2, FLTNB a_ang3, string a_cvt);
154 
155  //int Tlerp(HPFLTNB *ap_inputImage, HPFLTNB *ap_outputImage, uint32_t iov, uint32_t iiv, FLTNB dX, FLTNB dY, FLTNB dZ);
156 
157  // -----------------------------------------------------------------------------------------
158  // Data members
159  private:
160  vector<string>
163  vector<string>
179 };
180 
181 // 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)
182 CLASS_DEFORMATION(deformationRigid,iDeformationRigid)
183 
184 #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...
#define FLTNB
Definition: gVariables.hh:81
~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.
#define CLASS_DEFORMATION(NAME, CLASS)
#define HPFLTNB
Definition: gVariables.hh:83
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...
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)
This function performs a rigid transformation using x,y,z displacement vectors and trilinear interpol...
#define FUNCTION_DEFORMATION(CLASS)
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.
Definition: vDeformation.hh:64
vector< string > m_pathToBwdDeformationFiles
Declaration of class oMatrix.
Declaration of class vDeformation.
vector< string > m_pathToFwdDeformationFiles
Declaration of class oImageSpace.
iDeformationRigid()
Constructor of iDeformationRigid. Simply set all data members to default values.
Structure designed for basic matrices operations.
Definition: oMatrix.hh:41
int ApplyDeformations(FLTNB *ap_inputImage, FLTNB *ap_outputImage, int a_direction, int a_defIdx)
This function prepares the deformation to perform.
int Initialize()
This function is used to initialize specific stuff in the deformation model.
Declaration of class sAddonManager.