1 /*-------------------------------------------------------------------------
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.
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.
11 -------------------------------------------------------------------------*/
13 #ifndef CLITKIMAGEFILLREGIONGENERICFILTER_H
14 #define CLITKIMAGEFILLREGIONGENERICFILTER_H
17 -------------------------------------------------------------------
18 * @file clitkImageFillRegionGenericFilter.h
19 * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
21 -------------------------------------------------------------------*/
24 #include "clitkCommon.h"
25 #include "clitkImageCommon.h"
26 #include "clitkImageToImageGenericFilter.h"
30 #include "itkImageIOBase.h"
31 #include "itkImageRegionIterator.h"
32 #include "itkImageRegionConstIterator.h"
33 #include "itkImageRegionIteratorWithIndex.h"
37 //--------------------------------------------------------------------
38 class ImageFillRegionGenericFilter:
39 public clitk::ImageToImageGenericFilter<ImageFillRegionGenericFilter> {
44 ImageFillRegionGenericFilter ();
45 ~ImageFillRegionGenericFilter (){;}
48 typedef ImageFillRegionGenericFilter Self;
49 typedef itk::SmartPointer<Self> Pointer;
50 typedef itk::SmartPointer<const Self> ConstPointer;
56 void SetFillPixelValue (double value) { mPixelValue = value; }
57 void SetRegion(int * size, int * start) { mSize = size; mStart = start ; }
58 void SetSphericRegion(std::vector<double> & radius, std::vector<double> & center);
59 void SetSphericRegion(std::vector<double> & radius);
61 //--------------------------------------------------------------------
62 // Main function called each time the filter is updated
63 template<class InputImageType>
64 void UpdateWithInputImageType();
67 template<unsigned int Dim> void InitializeImageType();
71 std::vector<double> mCenter;
72 std::vector<double> mRadius;
76 template<unsigned int Dim, class PixelType> void Update_WithDimAndPixelType_SphericRegion();
78 }; // end class ImageFillRegionGenericFilter
79 //--------------------------------------------------------------------
81 #include "clitkImageFillRegionGenericFilter.txx"
84 //--------------------------------------------------------------------
86 #endif //#define CLITKIMAGEFILLREGIONGENERICFILTER_H