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