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