ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkVanHerkGilWermanErodeDilateImageFilter.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 __itkVanHerkGilWermanErodeDilateImageFilter_h
00019 #define __itkVanHerkGilWermanErodeDilateImageFilter_h
00020 
00021 #include "itkKernelImageFilter.h"
00022 #include "itkProgressReporter.h"
00023 #include "itkBresenhamLine.h"
00024 
00025 namespace itk
00026 {
00027 
00028 template< class TInputImage, class TOutputImage, class TKernel > class KernelImageFilter;
00029 
00040 template< class TImage, class TKernel, class TFunction1 >
00041 class ITK_EXPORT VanHerkGilWermanErodeDilateImageFilter:
00042   public KernelImageFilter< TImage, TImage, TKernel >
00043 {
00044 public:
00045 
00047   typedef VanHerkGilWermanErodeDilateImageFilter Self;
00048   typedef KernelImageFilter< TImage, TImage, TKernel >
00049                                                  Superclass;
00050   typedef SmartPointer< Self >                   Pointer;
00051   typedef SmartPointer< const Self >             ConstPointer;
00052 
00056   typedef TKernel KernelType;
00057 
00058   typedef TImage                                InputImageType;
00059   typedef typename InputImageType::Pointer      InputImagePointer;
00060   typedef typename InputImageType::ConstPointer InputImageConstPointer;
00061   typedef typename InputImageType::RegionType   InputImageRegionType;
00062   typedef typename InputImageType::PixelType    InputImagePixelType;
00063   typedef typename TImage::IndexType            IndexType;
00064   typedef typename TImage::SizeType             SizeType;
00065 
00067   itkStaticConstMacro(InputImageDimension, unsigned int,
00068                       TImage::ImageDimension);
00069   itkStaticConstMacro(OutputImageDimension, unsigned int,
00070                       TImage::ImageDimension);
00072 
00074   itkNewMacro(Self);
00075 
00077   itkTypeMacro(VanHerkGilWermanErodeDilateImageFilter,
00078                ImageToImageFilter);
00079 
00081   itkSetMacro(Boundary, InputImagePixelType);
00082   itkGetConstMacro(Boundary, InputImagePixelType);
00084 
00085 protected:
00086   VanHerkGilWermanErodeDilateImageFilter();
00087   ~VanHerkGilWermanErodeDilateImageFilter() {}
00088   void PrintSelf(std::ostream & os, Indent indent) const;
00089 
00091   void  ThreadedGenerateData(const InputImageRegionType & outputRegionForThread,
00092                              ThreadIdType threadId);
00093 
00094   // should be set by the meta filter
00095   InputImagePixelType m_Boundary;
00096 
00097 private:
00098   VanHerkGilWermanErodeDilateImageFilter(const Self &); //purposely not implemented
00099   void operator=(const Self &);                         //purposely not implemented
00100 
00101   typedef BresenhamLine< itkGetStaticConstMacro(InputImageDimension) > BresType;
00102 
00103 }; // end of class
00104 } // end namespace itk
00105 
00106 #ifndef ITK_MANUAL_INSTANTIATION
00107 #include "itkVanHerkGilWermanErodeDilateImageFilter.hxx"
00108 #endif
00109 
00110 #endif
00111