]> Creatis software - clitk.git/blob - tools/clitkAffineTransformGenericFilter.h
Initial revision
[clitk.git] / tools / clitkAffineTransformGenericFilter.h
1 #ifndef clitkAffineTransformGenericFilter_h
2 #define clitkAffineTransformGenericFilter_h
3
4 /* =================================================
5  * @file   clitkAffineTransformGenericFilter.h
6  * @author jefvdmb@gmail.com
7  * @date   
8  * 
9  * @brief 
10  * 
11  ===================================================*/
12
13
14 // clitk include
15 #include "clitkIO.h"
16 #include "clitkCommon.h"
17 #include "clitkAffineTransform_ggo.h"
18 #include "clitkTransformUtilities.h"
19 #include "clitkGenericInterpolator.h"
20 #include "clitkGenericVectorInterpolator.h"
21
22 //itk include
23 #include "itkLightObject.h"
24 #include "itkAffineTransform.h"
25 #include "itkResampleImageFilter.h"
26 #include "itkVectorResampleImageFilter.h"
27
28
29 namespace clitk 
30 {
31
32
33   template<class args_info_type>
34   class ITK_EXPORT AffineTransformGenericFilter : public itk::LightObject
35   {
36   public:
37     //----------------------------------------
38     // ITK
39     //----------------------------------------
40     typedef AffineTransformGenericFilter                   Self;
41     typedef itk::LightObject                   Superclass;
42     typedef itk::SmartPointer<Self>            Pointer;
43     typedef itk::SmartPointer<const Self>      ConstPointer;
44    
45     // Method for creation through the object factory
46     itkNewMacro(Self);  
47
48     // Run-time type information (and related methods)
49     itkTypeMacro( AffineTransformGenericFilter, LightObject );
50
51
52     //----------------------------------------
53     // Typedefs
54     //----------------------------------------
55
56
57     //----------------------------------------
58     // Set & Get
59     //----------------------------------------    
60     void SetArgsInfo(const args_info_type & a)
61     {
62       m_ArgsInfo=a;
63       m_Verbose=m_ArgsInfo.verbose_flag;
64       m_InputFileName=m_ArgsInfo.input_arg;
65     }
66     
67     
68     //----------------------------------------  
69     // Update
70     //----------------------------------------  
71     void Update();
72
73   protected:
74
75     //----------------------------------------  
76     // Constructor & Destructor
77     //----------------------------------------  
78     AffineTransformGenericFilter();
79     ~AffineTransformGenericFilter() {};
80
81     
82     //----------------------------------------  
83     // Templated members
84     //----------------------------------------  
85     template <unsigned int Dimension>  void UpdateWithDim(std::string PixelType, int Components);
86     template <unsigned int Dimension, class PixelType>  void UpdateWithDimAndPixelType();
87     template <unsigned int Dimension, class PixelType>  void UpdateWithDimAndVectorType();
88
89     //----------------------------------------  
90     // Data members
91     //----------------------------------------
92     args_info_type m_ArgsInfo;
93     bool m_Verbose;
94     std::string m_InputFileName;
95
96   };
97
98
99 } // end namespace clitk
100
101 #ifndef ITK_MANUAL_INSTANTIATION
102 #include "clitkAffineTransformGenericFilter.txx"
103 #endif
104
105 #endif // #define clitkAffineTransformGenericFilter_h