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