Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkVanHerkGilWermanErodeDilateImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVanHerkGilWermanErodeDilateImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-23 03:43:42 $
00007   Version:   $Revision: 1.3 $
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 __itkVanHerkGilWermanErodeDilateImageFilter_h
00019 #define __itkVanHerkGilWermanErodeDilateImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 #include "itkProgressReporter.h"
00023 #include "itkBresenhamLine.h"
00024 
00025 namespace itk {
00026 
00036 template<class TImage, class TKernel, 
00037          class TFunction1>
00038 class ITK_EXPORT VanHerkGilWermanErodeDilateImageFilter :
00039     public ImageToImageFilter<TImage, TImage>
00040 {
00041 public:
00042 
00044   typedef VanHerkGilWermanErodeDilateImageFilter   Self;
00045   typedef ImageToImageFilter<TImage, TImage>       Superclass;
00046   typedef SmartPointer<Self>                       Pointer;
00047   typedef SmartPointer<const Self>                 ConstPointer;
00048 
00052   typedef TKernel                                  KernelType;
00053 
00054   typedef TImage                                   InputImageType;
00055   typedef typename InputImageType::Pointer         InputImagePointer;
00056   typedef typename InputImageType::ConstPointer    InputImageConstPointer;
00057   typedef typename InputImageType::RegionType      InputImageRegionType;
00058   typedef typename InputImageType::PixelType       InputImagePixelType;
00059   typedef typename TImage::IndexType               IndexType;
00060   typedef typename TImage::SizeType                SizeType;
00061 
00063   itkStaticConstMacro(InputImageDimension, unsigned int,
00064                       TImage::ImageDimension);
00065   itkStaticConstMacro(OutputImageDimension, unsigned int,
00066                       TImage::ImageDimension);
00068 
00070   itkNewMacro(Self);
00071 
00073   itkTypeMacro(VanHerkGilWermanErodeDilateImageFilter,
00074                ImageToImageFilter);
00075 
00076   void SetKernel( const KernelType& kernel )
00077     {
00078     m_Kernel=kernel;
00079     m_KernelSet = true;
00080     }
00081 
00083   void SetBoundary( const InputImagePixelType value );
00084   itkGetConstMacro(Boundary, InputImagePixelType);
00086 
00087 
00088 protected:
00089   VanHerkGilWermanErodeDilateImageFilter();
00090   ~VanHerkGilWermanErodeDilateImageFilter() {};
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   // should be set by the meta filter
00105   InputImagePixelType m_Boundary;
00106 
00107 private:
00108   VanHerkGilWermanErodeDilateImageFilter(const Self&); //purposely not implemented
00109   void operator=(const Self&); //purposely not implemented
00110 
00111   TKernel m_Kernel;
00112   bool    m_KernelSet;
00113   typedef BresenhamLine<itkGetStaticConstMacro(InputImageDimension)> BresType;
00114 
00115 
00116 }; // end of class
00117 
00118 
00119 } // end namespace itk
00120 
00121 
00122 #ifndef ITK_MANUAL_INSTANTIATION
00123 #include "itkVanHerkGilWermanErodeDilateImageFilter.txx"
00124 #endif
00125 
00126 #endif
00127 

Generated at Fri Apr 16 19:53:00 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000