]> Creatis software - clitk.git/blob - filters/clitkImageConvertGenericFilter.h
added the new headers
[clitk.git] / filters / clitkImageConvertGenericFilter.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://oncora1.lyon.fnclcc.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 CLITKIMAGECONVERTGENERICFILTER_H
19 #define CLITKIMAGECONVERTGENERICFILTER_H
20 /**
21  ===================================================================
22  * @file   clitkImageConvertGenericFilter.h
23  * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
24  * @date   05 May 2008 10:40:24
25
26  * @brief  
27
28  ===================================================================*/
29
30 // clitk include
31 #include "clitkImageToImageGenericFilter.h"
32
33 // itk include
34 #include "itkCastImageFilter.h"
35
36 namespace clitk {
37   
38   class ImageConvertGenericFilter: 
39     public clitk::ImageToImageGenericFilter<ImageConvertGenericFilter> {
40     
41   public: 
42     // constructor - destructor
43     ImageConvertGenericFilter();
44
45     // Types
46     typedef ImageConvertGenericFilter     Self;
47     typedef itk::SmartPointer<Self>       Pointer;
48     typedef itk::SmartPointer<const Self> ConstPointer;
49
50     // New
51     itkNewMacro(Self);
52     
53     // Members functions
54     void SetOutputPixelType(std::string p) { mOutputPixelTypeName = p; }
55
56     //--------------------------------------------------------------------
57     // Main function called each time the filter is updated
58     template<class InputImageType>  
59     void UpdateWithInputImageType();
60
61   protected:
62     template<unsigned int Dim> void InitializeImageType();
63     std::string mOutputPixelTypeName;
64
65     template<class InputImageType, class OutputPixelType> void UpdateWithOutputType();
66
67   }; // end class ImageConvertGenericFilter
68
69   //#include "clitkImageConvertGenericFilter.txx"
70
71 } // end namespace
72
73 #endif /* end #define CLITKIMAGECONVERTGENERICFILTER_H */
74