]> Creatis software - clitk.git/blob - filters/clitkSplitImageGenericFilter.h
mechanism for hiding experimental stuff in vv
[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: 
38     public clitk::ImageToImageGenericFilter<SplitImageGenericFilter> {
39   
40   public:
41         
42     // Constructor 
43     SplitImageGenericFilter ();
44
45     // Types
46     typedef SplitImageGenericFilter       Self;
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    //--------------------------------------------------------------------
58     // Main function called each time the filter is updated
59     template<class InputImageType>  
60     void UpdateWithInputImageType();
61
62   protected:  
63     template<unsigned int Dim> void InitializeImageType();
64     int  mSplitDimension;
65     bool m_Verbose;
66
67   }; // end class SplitImageGenericFilter
68 //--------------------------------------------------------------------
69
70 } // end namespace
71 //--------------------------------------------------------------------
72
73 #endif //#define clitkSplitImageGenericFilter_H
74