CASToR
3.0
Tomographic Reconstruction (PET/SPECT/CT)
include
image
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
44
class
iDeformationRigid
:
public
vDeformation
45
{
46
// -----------------------------------------------------------------------------------------
47
// Constructor & Destructor
48
public
:
53
iDeformationRigid
();
58
~iDeformationRigid
();
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)
65
FUNCTION_DEFORMATION
(
iDeformationRigid
)
72
int
ReadAndCheckConfigurationFile
(
const
string
& a_fileOptions);
80
int
ReadAndCheckOptionsList
(
const
string
& a_listOptions);
87
int
CheckSpecificParameters
();
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
139
int
ComputeTransformationMatrices
();
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>
161
m_pathToFwdDeformationFiles
;
163
vector<string>
164
m_pathToBwdDeformationFiles
;
166
HPFLTNB
*
mp_OriginalArray
;
167
HPFLTNB
*
mp_OutputArray
;
168
HPFLTNB
*
mp_tX
;
169
HPFLTNB
*
mp_tY
;
170
HPFLTNB
*
mp_tZ
;
171
HPFLTNB
*
mp_rA
;
172
HPFLTNB
*
mp_rB
;
173
HPFLTNB
*
mp_rC
;
174
oMatrix
**
m2p_FTmtx
;
175
oMatrix
**
m2p_BTmtx
;
176
string
m_rotConvention
;
177
bool
m_cmpTransfoFlag
;
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
iDeformationRigid::ShowHelp
void ShowHelp()
This function is used to print out specific help about the deformation and its options.
Definition:
iDeformationRigid.cc:105
iDeformationRigid
This class performs rigid transformation based on a trilinear interpolation It requires ASCII paramet...
Definition:
iDeformationRigid.hh:44
FLTNB
#define FLTNB
Definition:
gVariables.hh:81
iDeformationRigid::~iDeformationRigid
~iDeformationRigid()
Destructor of iDeformationRigid. Free memory from all allocated tabs.
Definition:
iDeformationRigid.cc:67
iDeformationRigid::m_cmpTransfoFlag
bool m_cmpTransfoFlag
Definition:
iDeformationRigid.hh:177
iDeformationRigid::ReadAndCheckConfigurationFile
int ReadAndCheckConfigurationFile(const string &a_fileOptions)
This function is used to read options from a configuration file.
Definition:
iDeformationRigid.cc:158
CLASS_DEFORMATION
#define CLASS_DEFORMATION(NAME, CLASS)
Definition:
vDeformation.hh:275
HPFLTNB
#define HPFLTNB
Definition:
gVariables.hh:83
iDeformationRigid::ReadAndCheckOptionsList
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...
Definition:
iDeformationRigid.cc:246
iDeformationRigid::CheckSpecificParameters
int CheckSpecificParameters()
This function is used to check parameters after the latter have been all set using Set functions...
Definition:
iDeformationRigid.cc:432
iDeformationRigid::TransformImage
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...
Definition:
iDeformationRigid.cc:552
FUNCTION_DEFORMATION
#define FUNCTION_DEFORMATION(CLASS)
Definition:
vDeformation.hh:271
iDeformationRigid::SetRotationMatrix
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...
Definition:
iDeformationRigid.cc:642
iDeformationRigid::mp_OutputArray
HPFLTNB * mp_OutputArray
Definition:
iDeformationRigid.hh:167
iDeformationRigid::mp_rA
HPFLTNB * mp_rA
Definition:
iDeformationRigid.hh:171
iDeformationRigid::m2p_FTmtx
oMatrix ** m2p_FTmtx
Definition:
iDeformationRigid.hh:174
iDeformationRigid::ComputeTransformationMatrices
int ComputeTransformationMatrices()
Initialize transformation matrices from parameters.
Definition:
iDeformationRigid.cc:315
vDeformation
This is the mother class of image-based transformation class.
Definition:
vDeformation.hh:64
iDeformationRigid::m_pathToBwdDeformationFiles
vector< string > m_pathToBwdDeformationFiles
Definition:
iDeformationRigid.hh:164
oMatrix.hh
Declaration of class oMatrix.
vDeformation.hh
Declaration of class vDeformation.
iDeformationRigid::m_pathToFwdDeformationFiles
vector< string > m_pathToFwdDeformationFiles
Definition:
iDeformationRigid.hh:161
oImageSpace.hh
Declaration of class oImageSpace.
iDeformationRigid::mp_rC
HPFLTNB * mp_rC
Definition:
iDeformationRigid.hh:173
iDeformationRigid::mp_OriginalArray
HPFLTNB * mp_OriginalArray
Definition:
iDeformationRigid.hh:166
iDeformationRigid::iDeformationRigid
iDeformationRigid()
Constructor of iDeformationRigid. Simply set all data members to default values.
Definition:
iDeformationRigid.cc:40
oMatrix
Structure designed for basic matrices operations.
Definition:
oMatrix.hh:41
iDeformationRigid::m_rotConvention
string m_rotConvention
Definition:
iDeformationRigid.hh:176
iDeformationRigid::mp_tX
HPFLTNB * mp_tX
Definition:
iDeformationRigid.hh:168
iDeformationRigid::m2p_BTmtx
oMatrix ** m2p_BTmtx
Definition:
iDeformationRigid.hh:175
iDeformationRigid::mp_rB
HPFLTNB * mp_rB
Definition:
iDeformationRigid.hh:172
iDeformationRigid::mp_tZ
HPFLTNB * mp_tZ
Definition:
iDeformationRigid.hh:170
iDeformationRigid::mp_tY
HPFLTNB * mp_tY
Definition:
iDeformationRigid.hh:169
iDeformationRigid::ApplyDeformations
int ApplyDeformations(FLTNB *ap_inputImage, FLTNB *ap_outputImage, int a_direction, int a_defIdx)
This function prepares the deformation to perform.
Definition:
iDeformationRigid.cc:500
iDeformationRigid::Initialize
int Initialize()
This function is used to initialize specific stuff in the deformation model.
Definition:
iDeformationRigid.cc:463
sAddonManager.hh
Declaration of class sAddonManager.
Generated on Fri Nov 15 2019 15:00:59 for CASToR by
1.8.13