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