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 {
00071 template <class TInputImage, class TOutputImage, class TKernel>
00072 class ITK_EXPORT BinaryErodeImageFilter :
00073 public BinaryMorphologyImageFilter< TInputImage, TOutputImage, TKernel >
00074 {
00075 public:
00076
00078 itkStaticConstMacro(InputImageDimension, unsigned int,
00079 TInputImage::ImageDimension);
00080 itkStaticConstMacro(OutputImageDimension, unsigned int,
00081 TOutputImage::ImageDimension);
00083
00085 itkStaticConstMacro(KernelDimension, unsigned int,
00086 TKernel::NeighborhoodDimension);
00087
00089 typedef TInputImage InputImageType;
00090 typedef TOutputImage OutputImageType;
00091 typedef TKernel KernelType;
00092
00093
00095 typedef BinaryErodeImageFilter Self;
00096 typedef BinaryMorphologyImageFilter< InputImageType, OutputImageType, KernelType> Superclass;
00097 typedef SmartPointer<Self> Pointer;
00098 typedef SmartPointer<const Self> ConstPointer;
00099
00101 itkNewMacro(Self);
00102
00104 itkTypeMacro(BinaryErodeImageFilter, BinaryMorphologyImageFilter);
00105
00107 typedef typename KernelType::ConstIterator KernelIteratorType ;
00108
00110 typedef typename InputImageType::PixelType InputPixelType;
00111 typedef typename OutputImageType::PixelType OutputPixelType;
00112 typedef typename NumericTraits<InputPixelType>::RealType InputRealType;
00113 typedef typename InputImageType::OffsetType OffsetType;
00114 typedef typename InputImageType::IndexType IndexType;
00115
00116 typedef typename InputImageType::RegionType InputImageRegionType;
00117 typedef typename OutputImageType::RegionType OutputImageRegionType;
00118 typedef typename InputImageType::SizeType InputSizeType;
00119
00123 void SetErodeValue(const InputPixelType& value)
00124 { this->SetForegroundValue( value ); }
00125
00129 InputPixelType GetErodeValue() const
00130 { return this->GetForegroundValue(); }
00131
00132 protected:
00133 BinaryErodeImageFilter();
00134 virtual ~BinaryErodeImageFilter(){}
00135 void PrintSelf(std::ostream& os, Indent indent) const;
00136
00147 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId );
00148
00149 void BeforeThreadedGenerateData();
00150
00151
00152 typedef typename Superclass::NeighborIndexContainer NeighborIndexContainer;
00153 typedef typename Superclass::BorderCellContainer BorderCellContainer;
00154 typedef typename Superclass::BorderCell BorderCell;
00155
00156 private:
00157 BinaryErodeImageFilter(const Self&);
00158 void operator=(const Self&);
00159
00160 };
00161
00162 }
00163
00164 #ifndef ITK_MANUAL_INSTANTIATION
00165 #include "itkBinaryErodeImageFilter.txx"
00166 #endif
00167
00168 #endif
00169