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