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