ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkGrayscaleFunctionErodeImageFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkGrayscaleFunctionErodeImageFilter_h
00019 #define __itkGrayscaleFunctionErodeImageFilter_h
00020 
00021 #include "itkMorphologyImageFilter.h"
00022 
00023 namespace itk
00024 {
00049 template< class TInputImage, class TOutputImage, class TKernel >
00050 class ITK_EXPORT GrayscaleFunctionErodeImageFilter:
00051   public MorphologyImageFilter< TInputImage, TOutputImage, TKernel >
00052 {
00053 public:
00055   typedef GrayscaleFunctionErodeImageFilter                           Self;
00056   typedef MorphologyImageFilter< TInputImage, TOutputImage, TKernel > Superclass;
00057   typedef SmartPointer< Self >                                        Pointer;
00058   typedef SmartPointer< const Self >                                  ConstPointer;
00059 
00061   itkNewMacro(Self);
00062 
00064   itkTypeMacro(GrayscaleFunctionErodeImageFilter,
00065                MorphologyImageFilter);
00066 
00068   typedef typename Superclass::PixelType PixelType;
00069 
00071   typedef typename Superclass::KernelIteratorType KernelIteratorType;
00072 
00074   typedef typename Superclass::NeighborhoodIteratorType NeighborhoodIteratorType;
00075 
00077   typedef typename Superclass::KernelType KernelType;
00078 
00080   typedef typename Superclass::DefaultBoundaryConditionType DefaultBoundaryConditionType;
00081 
00083   itkStaticConstMacro(InputImageDimension, unsigned int,
00084                       TInputImage::ImageDimension);
00085   itkStaticConstMacro(OutputImageDimension, unsigned int,
00086                       TOutputImage::ImageDimension);
00087   itkStaticConstMacro(KernelDimension, unsigned int,
00088                       TKernel::NeighborhoodDimension);
00090 
00092   typedef typename TKernel::PixelType KernelPixelType;
00093 
00094 #ifdef ITK_USE_CONCEPT_CHECKING
00095 
00096   itkConceptMacro( SameDimensionCheck1,
00097                    ( Concept::SameDimension< InputImageDimension, OutputImageDimension > ) );
00098   itkConceptMacro( SameDimensionCheck2,
00099                    ( Concept::SameDimension< InputImageDimension, KernelDimension > ) );
00100   itkConceptMacro( InputConvertibleToOutputCheck,
00101                    ( Concept::Convertible< PixelType, typename TOutputImage::PixelType > ) );
00102   itkConceptMacro( KernelConvertibleToInputCheck,
00103                    ( Concept::Convertible< KernelPixelType, PixelType > ) );
00104   itkConceptMacro( InputAdditiveOperatorsCheck,
00105                    ( Concept::AdditiveOperators< PixelType > ) );
00106   itkConceptMacro( InputLessThanComparableCheck,
00107                    ( Concept::LessThanComparable< PixelType > ) );
00108   itkConceptMacro( KernelGreaterThanComparableCheck,
00109                    ( Concept::GreaterThanComparable< KernelPixelType > ) );
00110 
00112 #endif
00113 protected:
00114   GrayscaleFunctionErodeImageFilter();
00115   ~GrayscaleFunctionErodeImageFilter() {}
00116 
00124   PixelType Evaluate(const NeighborhoodIteratorType & nit,
00125                      const KernelIteratorType kernelBegin,
00126                      const KernelIteratorType kernelEnd);
00127 
00128 private:
00129   GrayscaleFunctionErodeImageFilter(const Self &); //purposely not implemented
00130   void operator=(const Self &);                    //purposely not implemented
00131 
00132   // Default boundary condition for erosion filter, defaults to
00133   // NumericTraits<PixelType>::max()
00134   DefaultBoundaryConditionType m_ErodeBoundaryCondition;
00135 }; // end of class
00136 } // end namespace itk
00137 
00138 #ifndef ITK_MANUAL_INSTANTIATION
00139 #include "itkGrayscaleFunctionErodeImageFilter.hxx"
00140 #endif
00141 
00142 #endif
00143