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

itkAnchorErodeDilateImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkAnchorErodeDilateImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-08-07 03:20:20 $
00007   Version:   $Revision: 1.2 $
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 __itkAnchorErodeDilateImageFilter_h
00019 #define __itkAnchorErodeDilateImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 #include "itkProgressReporter.h"
00023 #include "itkAnchorErodeDilateLine.h"
00024 #include "itkBresenhamLine.h"
00025 
00026 namespace itk {
00027 
00037 template<class TImage, class TKernel, 
00038          class TFunction1, class TFunction2>
00039 class ITK_EXPORT AnchorErodeDilateImageFilter :
00040     public ImageToImageFilter<TImage, TImage>
00041 {
00042 public:
00043 
00045   typedef AnchorErodeDilateImageFilter             Self;
00046   typedef ImageToImageFilter<TImage, TImage>       Superclass;
00047   typedef SmartPointer<Self>                       Pointer;
00048   typedef SmartPointer<const Self>                 ConstPointer;
00049 
00053   typedef TKernel                                  KernelType;
00054 
00055   typedef TImage                                   InputImageType;
00056   typedef typename InputImageType::Pointer         InputImagePointer;
00057   typedef typename InputImageType::ConstPointer    InputImageConstPointer;
00058   typedef typename InputImageType::RegionType      InputImageRegionType;
00059   typedef typename InputImageType::PixelType       InputImagePixelType;
00060   typedef typename TImage::IndexType               IndexType;
00061   typedef typename TImage::SizeType                SizeType;
00062 
00064   itkStaticConstMacro(InputImageDimension, unsigned int,
00065                       TImage::ImageDimension);
00066   itkStaticConstMacro(OutputImageDimension, unsigned int,
00067                       TImage::ImageDimension);
00069 
00071   itkNewMacro(Self);
00072 
00074   itkTypeMacro(AnchorErodeDilateImageFilter,
00075                ImageToImageFilter);
00076 
00077   void SetKernel( const KernelType& kernel )
00078     {
00079     m_Kernel=kernel;
00080     m_KernelSet = true;
00081     }
00082 
00084   void SetBoundary( const InputImagePixelType value );
00085   itkGetMacro(Boundary, InputImagePixelType);
00087 
00088 protected:
00089   AnchorErodeDilateImageFilter();
00090   ~AnchorErodeDilateImageFilter() {};
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   AnchorErodeDilateImageFilter(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   // the class that operates on lines
00116   typedef AnchorErodeDilateLine<InputImagePixelType, TFunction1, TFunction2> AnchorLineType;
00117 
00118 }; // end of class
00119 
00120 
00121 } // end namespace itk
00122 
00123 
00124 #ifndef ITK_MANUAL_INSTANTIATION
00125 #include "itkAnchorErodeDilateImageFilter.txx"
00126 #endif
00127 
00128 #endif
00129 

Generated at Wed Nov 5 20:15:42 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000