]> Creatis software - clitk.git/blob - filters/clitkBinarizeImageGenericFilter.h
f35bc7a650a6d9ce2a9011b24be9156ff5e0e104
[clitk.git] / filters / clitkBinarizeImageGenericFilter.h
1 /*=========================================================================
2
3   Program:   clitk
4   Module:    $RCSfile: clitkBinarizeImageGenericFilter.h,v $
5   Language:  C++
6   Date:      $Date: 2010/01/29 07:28:33 $
7   Version:   $Revision: 1.1 $
8   Author :   Jef Vandemeulebroucke <jef@creatis.insa-lyon.fr>
9              David Sarrut (david.sarrut@creatis.insa-lyon.fr)
10
11   Copyright (C) 2008
12   Léon Bérard cancer center    http://oncora1.lyon.fnclcc.fr
13   CREATIS                      http://www.creatis.insa-lyon.fr
14
15   This program is free software: you can redistribute it and/or modify
16   it under the terms of the GNU General Public License as published by
17   the Free Software Foundation, version 3 of the License.
18
19   This program is distributed in the hope that it will be useful,
20   but WITHOUT ANY WARRANTY; without even the implied warranty of
21   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22   GNU General Public License for more details.
23
24   You should have received a copy of the GNU General Public License
25   along with this program.  If not, see <http://www.gnu.org/licenses/>.
26
27   =========================================================================*/
28
29 #ifndef CLITKBINARIZEIMAGEGENERICFILTER_H
30 #define CLITKBINARIZEIMAGEGENERICFILTER_H
31
32 // clitk include
33 #include "clitkIO.h"
34 #include "clitkCommon.h"
35 #include "clitkImageToImageGenericFilter.h"
36
37 // itk include
38 #include "itkBinaryThresholdImageFilter.h"
39
40 // std include
41 #include <map>
42
43 //--------------------------------------------------------------------
44 namespace clitk 
45 {
46   
47   template<class args_info_type>
48   class ITK_EXPORT BinarizeImageGenericFilter: 
49     public ImageToImageGenericFilter<BinarizeImageGenericFilter<args_info_type> >
50   {
51     
52   public:
53
54     //--------------------------------------------------------------------
55     BinarizeImageGenericFilter();
56
57     //--------------------------------------------------------------------
58     typedef BinarizeImageGenericFilter         Self;
59     typedef itk::SmartPointer<Self>            Pointer;
60     typedef itk::SmartPointer<const Self>      ConstPointer;
61    
62     //--------------------------------------------------------------------
63     // Method for creation through the object factory
64     // and Run-time type information (and related methods)
65     itkNewMacro(Self);  
66     itkTypeMacro(BinarizeImageGenericFilter, LightObject);
67
68     //--------------------------------------------------------------------
69     void SetArgsInfo(const args_info_type & a);
70
71     //--------------------------------------------------------------------
72     // Main function called each time the filter is updated
73     template<class InputImageType>  
74     void UpdateWithInputImageType();
75
76   protected:
77     template<unsigned int Dim> void InitializeImageType();
78     args_info_type mArgsInfo;
79     
80   }; // end class
81   //--------------------------------------------------------------------
82     
83 } // end namespace clitk
84
85 #ifndef ITK_MANUAL_INSTANTIATION
86 #include "clitkBinarizeImageGenericFilter.txx"
87 #endif
88
89 #endif // #define clitkBinarizeImageGenericFilter_h