00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkBinaryMorphologicalClosingImageFilter_h
00019 #define __itkBinaryMorphologicalClosingImageFilter_h
00020
00021 #include "itkImageToImageFilter.h"
00022
00023 namespace itk {
00024
00046 template<class TInputImage, class TOutputImage, class TKernel>
00047 class ITK_EXPORT BinaryMorphologicalClosingImageFilter :
00048 public ImageToImageFilter<TInputImage, TOutputImage>
00049 {
00050 public:
00052 typedef BinaryMorphologicalClosingImageFilter Self;
00053 typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass;
00054 typedef SmartPointer<Self> Pointer;
00055 typedef SmartPointer<const Self> ConstPointer;
00056
00058 itkNewMacro(Self);
00059
00061 itkTypeMacro(BinaryMorphologicalClosingImageFilter,
00062 ImageToImageFilter);
00063
00064 typedef TInputImage InputImageType;
00065 typedef TOutputImage OutputImageType;
00066 typedef typename InputImageType::Pointer InputImagePointer;
00067 typedef typename OutputImageType::RegionType OutputImageRegionType;
00068
00070 typedef typename TInputImage::PixelType InputPixelType;
00071 typedef typename TInputImage::PixelType OutputPixelType;
00072
00074 typedef TKernel KernelType;
00075
00077 itkSetMacro(Kernel, KernelType);
00078
00080 itkGetConstReferenceMacro(Kernel, KernelType);
00081
00084 itkSetMacro(ForegroundValue, InputPixelType);
00085
00088 itkGetMacro(ForegroundValue, InputPixelType);
00089
00090
00093 itkSetMacro(SafeBorder, bool);
00094 itkGetConstReferenceMacro(SafeBorder, bool);
00095 itkBooleanMacro(SafeBorder);
00097
00098 protected:
00099 BinaryMorphologicalClosingImageFilter();
00100 ~BinaryMorphologicalClosingImageFilter() {};
00101 void PrintSelf(std::ostream& os, Indent indent) const;
00102
00108 void GenerateInputRequestedRegion();
00109
00112 void GenerateData ();
00113
00114 private:
00115 BinaryMorphologicalClosingImageFilter(const Self&);
00116 void operator=(const Self&);
00117
00119 KernelType m_Kernel;
00120
00121 InputPixelType m_ForegroundValue;
00122
00123 bool m_SafeBorder;
00124 };
00125
00126 }
00127
00128 #ifndef ITK_MANUAL_INSTANTIATION
00129 #include "itkBinaryMorphologicalClosingImageFilter.txx"
00130 #endif
00131
00132 #endif
00133