16 #ifndef __itkIntelligentBinaryClosingFilter_h
17 #define __itkIntelligentBinaryClosingFilter_h
20 #pragma warning(disable : 4786)
23 #include <itkBinaryBallStructuringElement.h>
24 #include <itkBinaryDilateImageFilter.h>
25 #include <itkBinaryErodeImageFilter.h>
26 #include <itkConnectedComponentImageFilter.h>
27 #include <itkConnectedComponentImageFilter.h>
28 #include <itkGrayscaleDilateImageFilter.h>
29 #include <itkImageRegionIterator.h>
30 #include <itkImageToImageFilter.h>
31 #include <itkRelabelComponentImageFilter.h>
32 #include <itkSubtractImageFilter.h>
41 template <
class TInputImage,
class TOutputImage>
52 itkStaticConstMacro(ImageDimension,
unsigned int, TInputImage::ImageDimension);
58 typedef ImageToImageFilter<InputImageType, OutputImageType>
Superclass;
67 itkFactorylessNewMacro(Self) itkCloneMacro(Self)
74 void SetInput(const InputImageType *input)
77 this->ProcessObject::SetNthInput(0, const_cast<InputImageType *>(input));
78 m_DilateImageFilter->SetInput(const_cast<InputImageType *>(input));
81 using Superclass::SetInput;
82 virtual void SetInput(
unsigned int i,
const TInputImage *image)
86 itkExceptionMacro(<<
"Filter has only one input.");
90 this->SetInput(image);
94 itkGetMacro(ClosingRadius,
float);
95 itkSetMacro(ClosingRadius,
float);
97 itkGetMacro(SurfaceRatio,
float);
98 itkSetMacro(SurfaceRatio,
float);
105 void PrintSelf(std::ostream &os, Indent indent)
const;
109 typedef BinaryBallStructuringElement<InputPixelType, ImageDimension> StructuringElementType;
110 typedef BinaryErodeImageFilter<InputImageType, InputImageType, StructuringElementType> BinaryErodeImageFilterType;
111 typedef BinaryDilateImageFilter<InputImageType, InputImageType, StructuringElementType> BinaryDilateImageFilterType;
112 typedef SubtractImageFilter<InputImageType, InputImageType, InputImageType> SubtractImageFilterType;
113 typedef ConnectedComponentImageFilter<InputImageType, OutputImageType> ConnectedComponentImageFilterType;
114 typedef RelabelComponentImageFilter<OutputImageType, OutputImageType> RelabelComponentImageFilterType;
115 typedef GrayscaleDilateImageFilter<OutputImageType, OutputImageType, StructuringElementType>
116 DilateComponentImageFilterType;
117 typedef ImageRegionIterator<InputImageType> InputIteratorType;
118 typedef ImageRegionConstIterator<InputImageType> ConstInputIteratorType;
119 typedef ImageRegionIterator<OutputImageType> OutputIteratorType;
128 float m_ClosingRadius;
129 float m_SurfaceRatio;
134 #ifndef ITK_MANUAL_INSTANTIATION
139 #endif // IntelligentBinaryClosingFilter_h
itk::SmartPointer< Self > Pointer
void operator=(const Self &)
virtual void SetInput(unsigned int i, const TInputImage *image)
IntelligentBinaryClosingFilter(const Self &)
virtual ~IntelligentBinaryClosingFilter()
ImageToImageFilter< InputImageType, OutputImageType > Superclass
IntelligentBinaryClosingFilter Self
SmartPointer< Self > Pointer
TInputImage InputImageType
TOutputImage OutputImageType