]> Creatis software - clitk.git/blob - filters/clitkImageFillRegionGenericFilter.h
removed headers
[clitk.git] / filters / clitkImageFillRegionGenericFilter.h
1 #ifndef CLITKIMAGEFILLREGIONGENERICFILTER_H
2 #define CLITKIMAGEFILLREGIONGENERICFILTER_H
3 /**
4  -------------------------------------------------------------------
5  * @file   clitkImageFillRegionGenericFilter.h
6  * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
7  * @date   23 Feb 2008
8  -------------------------------------------------------------------*/
9
10 // clitk include
11 #include "clitkCommon.h"
12 #include "clitkImageCommon.h"
13 #include "clitkImageToImageGenericFilter.h"
14
15 // itk include
16 #include "itkImage.h"
17 #include "itkImageIOBase.h"
18 #include "itkImageRegionIterator.h"
19 #include "itkImageRegionConstIterator.h"
20 #include "itkImageRegionIteratorWithIndex.h"
21
22 namespace clitk {
23   
24   //--------------------------------------------------------------------
25   class ImageFillRegionGenericFilter: 
26     public clitk::ImageToImageGenericFilter<ImageFillRegionGenericFilter> {
27   
28   public:
29         
30     // Constructor 
31     ImageFillRegionGenericFilter ();
32     ~ImageFillRegionGenericFilter (){;}
33
34     // Types
35     typedef ImageFillRegionGenericFilter  Self;
36     typedef itk::SmartPointer<Self>       Pointer;
37     typedef itk::SmartPointer<const Self> ConstPointer;
38
39     // New
40     itkNewMacro(Self);
41     
42     // Set methods
43     void SetFillPixelValue (double value) { mPixelValue = value; }
44     void SetRegion(int * size, int * start) { mSize = size; mStart = start ; }
45     void SetSphericRegion(std::vector<double> & radius, std::vector<double> & center);
46     void SetSphericRegion(std::vector<double> & radius);
47
48     //--------------------------------------------------------------------
49     // Main function called each time the filter is updated
50     template<class InputImageType>  
51     void UpdateWithInputImageType();
52
53   protected:  
54     template<unsigned int Dim> void InitializeImageType();
55     double mPixelValue;
56     int * mSize;
57     int * mStart;
58     std::vector<double> mCenter;
59     std::vector<double> mRadius;
60     bool mSphericRegion;
61     bool m_IsCentered;
62
63     template<unsigned int Dim, class PixelType> void Update_WithDimAndPixelType_SphericRegion();
64
65   }; // end class ImageFillRegionGenericFilter
66 //--------------------------------------------------------------------
67
68 #include "clitkImageFillRegionGenericFilter.txx"
69
70 } // end namespace
71 //--------------------------------------------------------------------
72
73 #endif //#define CLITKIMAGEFILLREGIONGENERICFILTER_H
74