1 #ifndef clitkReconstructThroughDilationImageFilter_h
2 #define clitkReconstructThroughDilationImageFilter_h
4 /* =================================================
5 * @file clitkReconstructThroughDilationImageFilter.h
11 ===================================================*/
16 #include "clitkCommon.h"
17 #include "clitkConditionalBinaryDilateImageFilter.h"
20 #include "itkImageToImageFilter.h"
21 #include "itkBinaryBallStructuringElement.h"
22 #include "itkConnectedComponentImageFilter.h"
23 #include "itkStatisticsImageFilter.h"
24 #include "itkCastImageFilter.h"
25 #include "itkDifferenceImageFilter.h"
26 #include "itkThresholdImageFilter.h"
31 template <class InputImageType, class OutputImageType>
32 class ITK_EXPORT ReconstructThroughDilationImageFilter :
33 public itk::ImageToImageFilter<InputImageType, OutputImageType>
36 //----------------------------------------
38 //----------------------------------------
39 typedef ReconstructThroughDilationImageFilter Self;
40 typedef itk::ImageToImageFilter<InputImageType, OutputImageType> Superclass;
41 typedef itk::SmartPointer<Self> Pointer;
42 typedef itk::SmartPointer<const Self> ConstPointer;
44 // Method for creation through the object factory
47 // Run-time type information (and related methods)
48 itkTypeMacro( ReconstructThroughDilationImageFilter, ImageToImageFilter );
50 /** Dimension of the domain space. */
51 itkStaticConstMacro(InputImageDimension, unsigned int, Superclass::InputImageDimension);
52 itkStaticConstMacro(OutputImageDimension, unsigned int, Superclass::OutputImageDimension);
54 //----------------------------------------
56 //----------------------------------------
57 typedef typename OutputImageType::RegionType OutputImageRegionType;
58 typedef int InternalPixelType;
59 typedef typename InputImageType::PixelType InputPixelType;
60 typedef typename OutputImageType::PixelType OutputPixelType;
61 typedef typename InputImageType::SizeType SizeType;
63 //----------------------------------------
65 //----------------------------------------
66 itkBooleanMacro(Verbose);
67 itkSetMacro( Verbose, bool);
68 itkGetConstReferenceMacro( Verbose, bool);
69 void SetRadius ( const SizeType& s){ m_Radius=s; this->Modified();}
70 SizeType GetRadius(void){return m_Radius;}
71 itkSetMacro( ErosionPaddingValue, OutputPixelType);
72 itkGetConstMacro( ErosionPaddingValue, OutputPixelType)
73 itkSetMacro( MaximumNumberOfLabels, unsigned int);
74 itkGetConstMacro( MaximumNumberOfLabels, unsigned int);
75 itkSetMacro( BackgroundValue, InternalPixelType);
76 itkGetConstMacro( BackgroundValue, InternalPixelType);
77 itkSetMacro( ForegroundValue, InternalPixelType);
78 itkGetConstMacro( ForegroundValue, InternalPixelType);
82 //----------------------------------------
83 // Constructor & Destructor
84 //----------------------------------------
85 ReconstructThroughDilationImageFilter();
86 ~ReconstructThroughDilationImageFilter() {};
88 //----------------------------------------
90 //----------------------------------------
92 void GenerateData(void);
94 // // Threaded Generate Data
95 // void BeforeThreadedGenerateData(void );
96 // void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, int threadId );
97 // void AfterThreadedGenerateData(void );
98 // // Override defaults
99 // virtual void GenerateInputRequestedRegion();
100 // virtual void GenerateOutputInformation (void);
101 // virtual void EnlargeOutputRequestedRegion(DataObject *data);
102 // void AllocateOutputs();
103 //----------------------------------------
105 //----------------------------------------
107 InternalPixelType m_BackgroundValue;
108 InternalPixelType m_ForegroundValue;
109 unsigned int m_MaximumNumberOfLabels;
110 OutputPixelType m_ErosionPaddingValue;
116 } // end namespace clitk
118 #ifndef ITK_MANUAL_INSTANTIATION
119 #include "clitkReconstructThroughDilationImageFilter.txx"
122 #endif // #define clitkReconstructThroughDilationImageFilter_h