itkAnchorErodeDilateImageFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkAnchorErodeDilateImageFilter_h
00019 #define __itkAnchorErodeDilateImageFilter_h
00020
00021 #include "itkImageToImageFilter.h"
00022 #include "itkProgressReporter.h"
00023 #include "itkAnchorErodeDilateLine.h"
00024 #include "itkBresenhamLine.h"
00025
00026 namespace itk {
00027
00037 template<class TImage, class TKernel,
00038 class TFunction1, class TFunction2>
00039 class ITK_EXPORT AnchorErodeDilateImageFilter :
00040 public ImageToImageFilter<TImage, TImage>
00041 {
00042 public:
00043
00045 typedef AnchorErodeDilateImageFilter Self;
00046 typedef ImageToImageFilter<TImage, TImage> Superclass;
00047 typedef SmartPointer<Self> Pointer;
00048 typedef SmartPointer<const Self> ConstPointer;
00049
00053 typedef TKernel KernelType;
00054
00055 typedef TImage InputImageType;
00056 typedef typename InputImageType::Pointer InputImagePointer;
00057 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00058 typedef typename InputImageType::RegionType InputImageRegionType;
00059 typedef typename InputImageType::PixelType InputImagePixelType;
00060 typedef typename TImage::IndexType IndexType;
00061 typedef typename TImage::SizeType SizeType;
00062
00064 itkStaticConstMacro(InputImageDimension, unsigned int,
00065 TImage::ImageDimension);
00066 itkStaticConstMacro(OutputImageDimension, unsigned int,
00067 TImage::ImageDimension);
00069
00071 itkNewMacro(Self);
00072
00074 itkTypeMacro(AnchorErodeDilateImageFilter,
00075 ImageToImageFilter);
00076
00077 void SetKernel( const KernelType& kernel )
00078 {
00079 m_Kernel=kernel;
00080 m_KernelSet = true;
00081 }
00082
00084 void SetBoundary( const InputImagePixelType value );
00085 itkGetMacro(Boundary, InputImagePixelType);
00087
00088 protected:
00089 AnchorErodeDilateImageFilter();
00090 ~AnchorErodeDilateImageFilter() {};
00091 void PrintSelf(std::ostream& os, Indent indent) const;
00092
00094 void ThreadedGenerateData (const InputImageRegionType& outputRegionForThread,
00095 int threadId);
00096
00102 void GenerateInputRequestedRegion();
00103
00104
00105 InputImagePixelType m_Boundary;
00106
00107 private:
00108 AnchorErodeDilateImageFilter(const Self&);
00109 void operator=(const Self&);
00110
00111 TKernel m_Kernel;
00112 bool m_KernelSet;
00113 typedef BresenhamLine<itkGetStaticConstMacro(InputImageDimension)> BresType;
00114
00115
00116 typedef AnchorErodeDilateLine<InputImagePixelType, TFunction1, TFunction2> AnchorLineType;
00117
00118 };
00119
00120
00121 }
00122
00123
00124 #ifndef ITK_MANUAL_INSTANTIATION
00125 #include "itkAnchorErodeDilateImageFilter.txx"
00126 #endif
00127
00128 #endif
00129