]> Creatis software - clitk.git/blob - filters/clitkImageConvertGenericFilter.h
- new GF system
[clitk.git] / filters / clitkImageConvertGenericFilter.h
1 #ifndef CLITKIMAGECONVERTGENERICFILTER_H
2 #define CLITKIMAGECONVERTGENERICFILTER_H
3
4 /**
5  ===================================================================
6  * @file   clitkImageConvertGenericFilter.h
7  * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
8  * @date   05 May 2008 10:40:24
9
10  * @brief  
11
12  ===================================================================*/
13
14 // clitk include
15 #include "clitkImageToImageGenericFilter.h"
16
17 // itk include
18 #include "itkCastImageFilter.h"
19
20 namespace clitk {
21   
22   class ImageConvertGenericFilter: 
23     public clitk::ImageToImageGenericFilter<ImageConvertGenericFilter> {
24     
25   public: 
26     // constructor - destructor
27     ImageConvertGenericFilter();
28
29     // Types
30     typedef ImageConvertGenericFilter     Self;
31     typedef itk::SmartPointer<Self>       Pointer;
32     typedef itk::SmartPointer<const Self> ConstPointer;
33
34     // New
35     itkNewMacro(Self);
36     
37     // Members functions
38     void SetOutputPixelType(std::string p) { mOutputPixelTypeName = p; }
39
40     //--------------------------------------------------------------------
41     // Main function called each time the filter is updated
42     template<class InputImageType>  
43     void UpdateWithInputImageType();
44
45   protected:
46     template<unsigned int Dim> void InitializeImageType();
47     std::string mOutputPixelTypeName;
48
49     template<class InputImageType, class OutputPixelType> void UpdateWithOutputType();
50
51   }; // end class ImageConvertGenericFilter
52
53   //#include "clitkImageConvertGenericFilter.txx"
54
55 } // end namespace
56
57 #endif /* end #define CLITKIMAGECONVERTGENERICFILTER_H */
58