]> Creatis software - clitk.git/blob - registration/clitkGenericAffineTransform.cxx
Debug RTStruct conversion with empty struc
[clitk.git] / registration / clitkGenericAffineTransform.cxx
1  /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to:
5   - University of LYON              http://www.universite-lyon.fr/
6   - Léon Bérard cancer center       http://www.centreleonberard.fr
7   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
8
9   This software is distributed WITHOUT ANY WARRANTY; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  See the copyright notices for more information.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18
19 #include "clitkGenericAffineTransform.h"
20 #include "clitkAffineRegistration_ggo.h"
21
22 #include <itkEuler2DTransform.h>
23 #include <itkEuler3DTransform.h>
24
25 namespace clitk
26 {
27 //=========================================================================================================================
28 template<>
29 itk::MatrixOffsetTransformBase<double, 2, 2>::Pointer
30 clitk::GenericAffineTransform<args_info_clitkAffineRegistration, double, 2>::GetNewEulerTransform()
31 {
32   typedef itk::Euler2DTransform< double > Transform2DType;
33   Transform2DType::Pointer t2 = Transform2DType::New();
34   itk::MatrixOffsetTransformBase<double, 2, 2>::Pointer pp;
35   pp = t2;
36   return pp;
37 }
38
39 //=========================================================================================================================
40 template<>
41 itk::MatrixOffsetTransformBase<double, 3, 3>::Pointer
42 clitk::GenericAffineTransform<args_info_clitkAffineRegistration, double, 3>::GetNewEulerTransform()
43 {
44   typedef itk::Euler3DTransform < double > Transform3DType;
45   Transform3DType::Pointer t3 = Transform3DType::New();
46   t3->SetComputeZYX(true); //SR: required?
47   itk::MatrixOffsetTransformBase<double, 3, 3>::Pointer pp;
48   pp = t3;
49   return pp;
50 }
51 }