]> Creatis software - clitk.git/blob - filters/clitkSplitImageGenericFilter.h
added the new headers
[clitk.git] / filters / clitkSplitImageGenericFilter.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 clitkSplitImageGenericFilter_H
19 #define clitkSplitImageGenericFilter_H
20 /**
21  -------------------------------------------------------------------
22  * @file   clitkSplitImageGenericFilter.h
23  * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
24  * @date   23 Feb 2008
25  -------------------------------------------------------------------*/
26
27 // clitk include
28 #include "clitkCommon.h"
29 #include "clitkImageCommon.h"
30 #include "clitkImageToImageGenericFilter.h"
31
32 // itk include
33 #include "itkImage.h"
34 #include "itkImageIOBase.h"
35 #include "itkImageRegionIterator.h"
36 #include "itkImageRegionConstIterator.h"
37
38 namespace clitk {
39   
40   //--------------------------------------------------------------------
41   class SplitImageGenericFilter: 
42     public clitk::ImageToImageGenericFilter<SplitImageGenericFilter> {
43   
44   public:
45         
46     // Constructor 
47     SplitImageGenericFilter ();
48
49     // Types
50     typedef SplitImageGenericFilter       Self;
51     typedef itk::SmartPointer<Self>       Pointer;
52     typedef itk::SmartPointer<const Self> ConstPointer;
53
54     // New
55     itkNewMacro(Self);
56     
57     // Set methods
58     void SetSplitDimension (int dim) { mSplitDimension = dim; }
59     void SetVerbose (const bool v) { m_Verbose = v; }
60
61    //--------------------------------------------------------------------
62     // Main function called each time the filter is updated
63     template<class InputImageType>  
64     void UpdateWithInputImageType();
65
66   protected:  
67     template<unsigned int Dim> void InitializeImageType();
68     int  mSplitDimension;
69     bool m_Verbose;
70
71   }; // end class SplitImageGenericFilter
72 //--------------------------------------------------------------------
73
74 } // end namespace
75 //--------------------------------------------------------------------
76
77 #endif //#define clitkSplitImageGenericFilter_H
78