00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkVanHerkGilWermanErodeImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2009-02-24 19:03:15 $ 00007 Version: $Revision: 1.5 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef __itkVanHerkGilWermanErodeImageFilter_h 00019 #define __itkVanHerkGilWermanErodeImageFilter_h 00020 00021 #include "itkVanHerkGilWermanErodeDilateImageFilter.h" 00022 00023 namespace itk { 00024 template <class TPixel> 00025 class MinFunctor 00026 { 00027 public: 00028 MinFunctor(){} 00029 ~MinFunctor(){} 00030 inline TPixel operator()(const TPixel &A, const TPixel &B) const 00031 { 00032 return vnl_math_min(A, B); 00033 } 00034 }; 00035 00036 00037 template<class TImage, class TKernel> 00038 class ITK_EXPORT VanHerkGilWermanErodeImageFilter : 00039 public VanHerkGilWermanErodeDilateImageFilter<TImage, TKernel, MinFunctor<typename TImage::PixelType> > 00040 00041 { 00042 public: 00043 typedef VanHerkGilWermanErodeImageFilter Self; 00044 typedef VanHerkGilWermanErodeDilateImageFilter<TImage, TKernel, MinFunctor<typename TImage::PixelType> > Superclass; 00045 00047 itkTypeMacro(VanHerkGilWermanErodeImageFilter, 00048 VanHerkGilWermanErodeDilateImageFilter); 00049 00050 typedef SmartPointer<Self> Pointer; 00051 typedef SmartPointer<const Self> ConstPointer; 00052 00054 itkNewMacro(Self); 00055 00056 virtual ~VanHerkGilWermanErodeImageFilter() {} 00057 protected: 00058 00059 typedef typename TImage::PixelType PixelType; 00060 00061 VanHerkGilWermanErodeImageFilter() 00062 { 00063 this->m_Boundary = NumericTraits< PixelType >::max(); 00064 } 00065 00066 void PrintSelf(std::ostream& os, Indent indent) const 00067 { 00068 os << indent << "VanHerkGilWerman erosion: " << std::endl; 00069 } 00070 00071 private: 00072 00073 VanHerkGilWermanErodeImageFilter(const Self&); //purposely not implemented 00074 void operator=(const Self&); //purposely not implemented 00075 00076 }; 00077 00078 00079 } // namespace itk 00080 00081 #endif 00082