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