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://www.centreleonberard.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 ===========================================================================*/
19 #ifndef clitkReconstructWithConditionalGrayscaleDilateImageFilter_h
20 #define clitkReconstructWithConditionalGrayscaleDilateImageFilter_h
24 #include "clitkCommon.h"
25 #include "clitkConditionalGrayscaleDilateImageFilter.h"
30 This filter takes as input a multilabel image (and a bg value).
31 It performs several greyscale dilatation of radius 1, but only in
32 the bg pixels. It means that when two objects (with different
33 labels) will dilate inside each other (collistion), the dilatation
37 template <class ImageType>
38 class ITK_EXPORT ReconstructWithConditionalGrayscaleDilateImageFilter :
39 public itk::ImageToImageFilter<ImageType, ImageType>
42 //----------------------------------------
44 //----------------------------------------
45 typedef ReconstructWithConditionalGrayscaleDilateImageFilter Self;
46 typedef itk::ImageToImageFilter<ImageType, ImageType> Superclass;
47 typedef itk::SmartPointer<Self> Pointer;
48 typedef itk::SmartPointer<const Self> ConstPointer;
50 // Method for creation through the object factory
53 // Run-time type information (and related methods)
54 itkTypeMacro( ReconstructWithConditionalGrayscaleDilateImageFilter, ImageToImageFilter);
56 /** Dimension of the domain space. */
57 itkStaticConstMacro(ImageDimension, unsigned int, Superclass::InputImageDimension);
59 //----------------------------------------
61 //----------------------------------------
62 typedef typename ImageType::PixelType PixelType;
63 typedef typename ImageType::SizeType SizeType;
65 //----------------------------------------
67 //----------------------------------------
68 itkBooleanMacro(Verbose);
69 itkSetMacro( Verbose, bool);
70 itkGetConstReferenceMacro( Verbose, bool);
72 itkSetMacro(IterationNumber, int);
73 itkGetConstMacro(IterationNumber, int);
75 itkSetMacro(BackgroundValue, PixelType);
76 itkGetConstMacro(BackgroundValue, PixelType);
80 //----------------------------------------
81 // Constructor & Destructor
82 //----------------------------------------
83 ReconstructWithConditionalGrayscaleDilateImageFilter();
84 ~ReconstructWithConditionalGrayscaleDilateImageFilter() {};
86 //----------------------------------------
88 //----------------------------------------
90 void GenerateData(void);
92 //----------------------------------------
94 //----------------------------------------
96 PixelType m_BackgroundValue;
97 int m_IterationNumber;
100 } // end namespace clitk
102 #ifndef ITK_MANUAL_INSTANTIATION
103 #include "clitkReconstructWithConditionalGrayscaleDilateImageFilter.txx"
106 #endif // #define clitkReconstructWithConditionalGrayscaleDilateImageFilter_h