]> Creatis software - clitk.git/blob - filters/clitkSplitImageGenericFilter.h
remove antique RCS headers
[clitk.git] / filters / clitkSplitImageGenericFilter.h
1 /*-------------------------------------------------------------------------
2
3   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
4   l'Image). All rights reserved. See Doc/License.txt or
5   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
6                                                                                 
7      This software is distributed WITHOUT ANY WARRANTY; without even
8      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9      PURPOSE.  See the above copyright notices for more information.
10                                                                              
11 -------------------------------------------------------------------------*/
12
13 #ifndef clitkSplitImageGenericFilter_H
14 #define clitkSplitImageGenericFilter_H
15
16 /**
17  -------------------------------------------------------------------
18  * @file   clitkSplitImageGenericFilter.h
19  * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
20  * @date   23 Feb 2008
21  -------------------------------------------------------------------*/
22
23 // clitk include
24 #include "clitkCommon.h"
25 #include "clitkImageCommon.h"
26 #include "clitkImageToImageGenericFilter.h"
27
28 // itk include
29 #include "itkImage.h"
30 #include "itkImageIOBase.h"
31 #include "itkImageRegionIterator.h"
32 #include "itkImageRegionConstIterator.h"
33
34 namespace clitk {
35   
36   //--------------------------------------------------------------------
37   class SplitImageGenericFilter : public clitk::ImageToImageGenericFilter {
38   
39   public:
40         
41     // Constructor 
42     SplitImageGenericFilter ();
43
44     // Types
45     typedef SplitImageGenericFilter  Self;
46     typedef ImageToImageGenericFilter     Superclass;
47     typedef itk::SmartPointer<Self>       Pointer;
48     typedef itk::SmartPointer<const Self> ConstPointer;
49
50     // New
51     itkNewMacro(Self);
52     
53     // Set methods
54     void SetSplitDimension (int dim) { mSplitDimension = dim; }
55     void SetVerbose (const bool v) { m_Verbose = v; }
56
57     // Update
58     void Update ();
59
60   protected:  
61     int  mSplitDimension;
62     bool m_Verbose;
63     //--------------------------------------------------------------------
64     template<unsigned int Dim> void UpdateWithDim(std::string PixelType, int Components);
65     template<unsigned int Dim, class PixelType> void UpdateWithDimAndPixelType();
66     //--------------------------------------------------------------------
67
68   }; // end class SplitImageGenericFilter
69 //--------------------------------------------------------------------
70
71 } // end namespace
72 //--------------------------------------------------------------------
73
74 #endif //#define clitkSplitImageGenericFilter_H
75