]> Creatis software - clitk.git/blob - tools/clitkWarpImageGenericFilter.h
0ce874deb74c26f8773f7f0438c7ce1efecd5fa0
[clitk.git] / tools / clitkWarpImageGenericFilter.h
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 #ifndef clitkWarpImageGenericFilter_h
19 #define clitkWarpImageGenericFilter_h
20
21 /* =================================================
22  * @file   clitkWarpImageGenericFilter.h
23  * @author 
24  * @date   
25  * 
26  * @brief 
27  * 
28  ===================================================*/
29
30
31 // clitk include
32 #include "clitkIO.h"
33 #include "clitkCommon.h"
34 #include "clitkWarpImage_ggo.h"
35 #include "clitkForwardWarpImageFilter.h"
36 #include "clitkGenericInterpolator.h"
37 #include "clitkGenericVectorInterpolator.h"
38
39 //itk include
40 #include "itkLightObject.h"
41 #include "itkWarpImageFilter.h"
42 #include "itkVectorResampleImageFilter.h"
43
44 namespace clitk 
45 {
46
47
48   class ITK_EXPORT WarpImageGenericFilter : public itk::LightObject
49   {
50   public:
51     //----------------------------------------
52     // ITK
53     //----------------------------------------
54     typedef WarpImageGenericFilter                   Self;
55     typedef itk::LightObject                   Superclass;
56     typedef itk::SmartPointer<Self>            Pointer;
57     typedef itk::SmartPointer<const Self>      ConstPointer;
58    
59     // Method for creation through the object factory
60     itkNewMacro(Self);  
61
62     // Run-time type information (and related methods)
63     itkTypeMacro( WarpImageGenericFilter, LightObject );
64
65
66     //----------------------------------------
67     // Typedefs
68     //----------------------------------------
69
70
71     //----------------------------------------
72     // Set & Get
73     //----------------------------------------    
74     void SetArgsInfo(const args_info_clitkWarpImage & a)
75     {
76       m_ArgsInfo=a;
77       m_Verbose=m_ArgsInfo.verbose_flag;
78       m_InputFileName=m_ArgsInfo.input_arg;
79     }
80     
81     
82     //----------------------------------------  
83     // Update
84     //----------------------------------------  
85     void Update();
86
87   protected:
88
89     //----------------------------------------  
90     // Constructor & Destructor
91     //----------------------------------------  
92     WarpImageGenericFilter();
93     ~WarpImageGenericFilter() {};
94
95     
96     //----------------------------------------  
97     // Templated members
98     //----------------------------------------  
99     template <unsigned int Dimension>  void UpdateWithDim(std::string PixelType);
100     template <unsigned int Dimension, class PixelType>  void UpdateWithDimAndPixelType();
101
102     //----------------------------------------  
103     // Data members
104     //----------------------------------------
105     args_info_clitkWarpImage m_ArgsInfo;
106     bool m_Verbose;
107     std::string m_InputFileName;
108
109   };
110
111
112 } // end namespace clitk
113
114 #ifndef ITK_MANUAL_INSTANTIATION
115 #include "clitkWarpImageGenericFilter.txx"
116 #endif
117
118 #endif // #define clitkWarpImageGenericFilter_h