1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
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
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.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
18 #ifndef CLITKIMAGEFILLREGIONGENERICFILTER_H
19 #define CLITKIMAGEFILLREGIONGENERICFILTER_H
21 -------------------------------------------------------------------
22 * @file clitkImageFillRegionGenericFilter.h
23 * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
25 -------------------------------------------------------------------*/
28 #include "clitkCommon.h"
29 #include "clitkImageCommon.h"
30 #include "clitkImageToImageGenericFilter.h"
34 #include "itkImageIOBase.h"
35 #include "itkImageRegionIterator.h"
36 #include "itkImageRegionConstIterator.h"
37 #include "itkImageRegionIteratorWithIndex.h"
41 //--------------------------------------------------------------------
42 class ImageFillRegionGenericFilter:
43 public clitk::ImageToImageGenericFilter<ImageFillRegionGenericFilter> {
48 ImageFillRegionGenericFilter ();
49 ~ImageFillRegionGenericFilter (){;}
52 typedef ImageFillRegionGenericFilter Self;
53 typedef itk::SmartPointer<Self> Pointer;
54 typedef itk::SmartPointer<const Self> ConstPointer;
60 void SetFillPixelValue (double value) { mPixelValue = value; }
61 void SetRegion(int * size, int * start) { mSize = size; mStart = start ; }
62 void SetSphericRegion(std::vector<double> & radius, std::vector<double> & center);
63 void SetSphericRegion(std::vector<double> & radius);
65 //--------------------------------------------------------------------
66 // Main function called each time the filter is updated
67 template<class InputImageType>
68 void UpdateWithInputImageType();
71 template<unsigned int Dim> void InitializeImageType();
75 std::vector<double> mCenter;
76 std::vector<double> mRadius;
80 template<unsigned int Dim, class PixelType> void Update_WithDimAndPixelType_SphericRegion();
82 }; // end class ImageFillRegionGenericFilter
83 //--------------------------------------------------------------------
85 #include "clitkImageFillRegionGenericFilter.txx"
88 //--------------------------------------------------------------------
90 #endif //#define CLITKIMAGEFILLREGIONGENERICFILTER_H