00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkBinaryErodeImageFilter_h
00018 #define __itkBinaryErodeImageFilter_h
00019
00020 #include <vector>
00021 #include <queue>
00022 #include "itkBinaryMorphologyImageFilter.h"
00023 #include "itkImage.h"
00024 #include "itkNumericTraits.h"
00025 #include "itkNeighborhoodIterator.h"
00026 #include "itkConstNeighborhoodIterator.h"
00027 #include "itkNeighborhood.h"
00028 #include "itkImageBoundaryCondition.h"
00029 #include "itkImageRegionIterator.h"
00030 #include "itkConceptChecking.h"
00031
00032 namespace itk
00033 {
00067 template <class TInputImage, class TOutputImage, class TKernel>
00068 class ITK_EXPORT BinaryErodeImageFilter :
00069 public BinaryMorphologyImageFilter< TInputImage, TOutputImage, TKernel >
00070 {
00071 public:
00072
00074 itkStaticConstMacro(InputImageDimension, unsigned int,
00075 TInputImage::ImageDimension);
00076 itkStaticConstMacro(OutputImageDimension, unsigned int,
00077 TOutputImage::ImageDimension);
00079
00081 itkStaticConstMacro(KernelDimension, unsigned int,
00082 TKernel::NeighborhoodDimension);
00083
00085 typedef TInputImage InputImageType;
00086 typedef TOutputImage OutputImageType;
00087 typedef TKernel KernelType;
00088
00089
00091 typedef BinaryErodeImageFilter Self;
00092 typedef BinaryMorphologyImageFilter<InputImageType, OutputImageType,
00093 KernelType> Superclass;
00094 typedef SmartPointer<Self> Pointer;
00095 typedef SmartPointer<const Self> ConstPointer;
00096
00098 itkNewMacro(Self);
00099
00101 itkTypeMacro(BinaryErodeImageFilter, BinaryMorphologyImageFilter);
00102
00104 typedef typename KernelType::ConstIterator KernelIteratorType;
00105
00107 typedef typename InputImageType::PixelType InputPixelType;
00108 typedef typename OutputImageType::PixelType OutputPixelType;
00109 typedef typename NumericTraits<InputPixelType>::RealType InputRealType;
00110 typedef typename InputImageType::OffsetType OffsetType;
00111 typedef typename InputImageType::IndexType IndexType;
00112
00113 typedef typename InputImageType::RegionType InputImageRegionType;
00114 typedef typename OutputImageType::RegionType OutputImageRegionType;
00115 typedef typename InputImageType::SizeType InputSizeType;
00116
00120 void SetErodeValue(const InputPixelType& value)
00121 { this->SetForegroundValue( value ); }
00122
00126 InputPixelType GetErodeValue() const
00127 { return this->GetForegroundValue(); }
00128
00129 protected:
00130 BinaryErodeImageFilter();
00131 virtual ~BinaryErodeImageFilter(){}
00132 void PrintSelf(std::ostream& os, Indent indent) const;
00133
00134 void GenerateData();
00135
00136
00137 typedef typename Superclass::NeighborIndexContainer NeighborIndexContainer;
00138
00139 private:
00140 BinaryErodeImageFilter(const Self&);
00141 void operator=(const Self&);
00142
00143 };
00144
00145 }
00146
00147 #ifndef ITK_MANUAL_INSTANTIATION
00148 #include "itkBinaryErodeImageFilter.txx"
00149 #endif
00150
00151 #endif
00152