ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkBasicDilateImageFilter.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 __itkBasicDilateImageFilter_h
00019 #define __itkBasicDilateImageFilter_h
00020 
00021 #include "itkMorphologyImageFilter.h"
00022 
00023 namespace itk
00024 {
00047 template< class TInputImage, class TOutputImage, class TKernel >
00048 class ITK_EXPORT BasicDilateImageFilter:
00049   public MorphologyImageFilter< TInputImage, TOutputImage, TKernel >
00050 {
00051 public:
00053   typedef BasicDilateImageFilter                                      Self;
00054   typedef MorphologyImageFilter< TInputImage, TOutputImage, TKernel > Superclass;
00055   typedef SmartPointer< Self >                                        Pointer;
00056   typedef SmartPointer< const Self >                                  ConstPointer;
00057 
00059   itkNewMacro(Self);
00060 
00062   itkTypeMacro(BasicDilateImageFilter,
00063                MorphologyImageFilter);
00064 
00066   typedef typename Superclass::PixelType PixelType;
00067 
00069   typedef typename Superclass::KernelIteratorType KernelIteratorType;
00070 
00072   typedef typename Superclass::NeighborhoodIteratorType NeighborhoodIteratorType;
00073 
00075   typedef typename Superclass::KernelType KernelType;
00076 
00078   typedef typename Superclass::DefaultBoundaryConditionType DefaultBoundaryConditionType;
00079 
00081   itkStaticConstMacro(InputImageDimension, unsigned int,
00082                       TInputImage::ImageDimension);
00083   itkStaticConstMacro(OutputImageDimension, unsigned int,
00084                       TOutputImage::ImageDimension);
00085   itkStaticConstMacro(KernelDimension, unsigned int,
00086                       TKernel::NeighborhoodDimension);
00088 
00090   typedef typename TKernel::PixelType KernelPixelType;
00091 
00092 #ifdef ITK_USE_CONCEPT_CHECKING
00093 
00094   itkConceptMacro( InputConvertibleToOutputCheck,
00095                    ( Concept::Convertible< PixelType, typename TOutputImage::PixelType > ) );
00096   itkConceptMacro( SameDimensionCheck1,
00097                    ( Concept::SameDimension< InputImageDimension, OutputImageDimension > ) );
00098   itkConceptMacro( SameDimensionCheck2,
00099                    ( Concept::SameDimension< InputImageDimension, KernelDimension > ) );
00100   itkConceptMacro( InputGreaterThanComparableCheck,
00101                    ( Concept::GreaterThanComparable< PixelType > ) );
00102   itkConceptMacro( KernelGreaterThanComparableCheck,
00103                    ( Concept::GreaterThanComparable< KernelPixelType > ) );
00104 
00106 #endif
00107 protected:
00108   BasicDilateImageFilter();
00109   ~BasicDilateImageFilter() {}
00110 
00117   PixelType Evaluate(const NeighborhoodIteratorType & nit,
00118                      const KernelIteratorType kernelBegin,
00119                      const KernelIteratorType kernelEnd);
00120 
00121 private:
00122   BasicDilateImageFilter(const Self &); //purposely not implemented
00123   void operator=(const Self &);         //purposely not implemented
00124 
00125   // Default boundary condition for dilation filter, defaults to
00126   // NumericTraits<PixelType>::NonpositiveMin()
00127   DefaultBoundaryConditionType m_DilateBoundaryCondition;
00128 }; // end of class
00129 } // end namespace itk
00130 
00131 #ifndef ITK_MANUAL_INSTANTIATION
00132 #include "itkBasicDilateImageFilter.hxx"
00133 #endif
00134 
00135 #endif
00136