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

itkMorphologyImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkMorphologyImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/30 15:24:40 $
00007   Version:   $Revision: 1.12 $
00008 
00009   Copyright (c) 2002 Insight 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 #ifndef __itkMorphologyImageFilter_h
00018 #define __itkMorphologyImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkNeighborhoodIterator.h"
00022 #include "itkConstSmartNeighborhoodIterator.h"
00023 #include "itkNeighborhood.h"
00024 #include "itkConstSliceIterator.h"
00025 #include "itkImageBoundaryCondition.h"
00026 #include "itkImageRegionIterator.h"
00027 
00028 namespace itk {
00029 
00070 template<class TInputImage, class TOutputImage, class TKernel>
00071 class ITK_EXPORT MorphologyImageFilter : 
00072   public ImageToImageFilter<TInputImage, TOutputImage>
00073 {
00074 public:
00076   typedef MorphologyImageFilter Self;
00077   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00078   typedef SmartPointer<Self>        Pointer;
00079   typedef SmartPointer<const Self>  ConstPointer;
00080   
00082   itkTypeMacro(MorphologyImageFilter, ImageToImageFilter);
00083   
00085   typedef TInputImage InputImageType;
00086   typedef TOutputImage OutputImageType;
00087   typedef typename TInputImage::RegionType RegionType ;
00088   typedef typename TInputImage::SizeType SizeType ;
00089   typedef typename TInputImage::IndexType IndexType ;
00090   typedef typename TInputImage::PixelType PixelType ;
00091   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00092   
00094   itkStaticConstMacro(ImageDimension, unsigned int,
00095                       TInputImage::ImageDimension);
00096 
00098   typedef ConstNeighborhoodIterator<TInputImage> 
00099     NeighborhoodIteratorType ;
00100   typedef ConstSmartNeighborhoodIterator<TInputImage> 
00101     SmartNeighborhoodIteratorType ;
00102 
00104   typedef TKernel KernelType;
00105   
00107   typedef typename KernelType::ConstIterator KernelIteratorType ;
00108   
00110   typedef typename KernelType::SizeType RadiusType ;
00111 
00113   itkSetMacro(Kernel, KernelType);
00114 
00116   itkGetConstReferenceMacro(Kernel, KernelType);
00117   
00123   void GenerateInputRequestedRegion() ;
00124 
00125 protected:
00126   MorphologyImageFilter();
00127   ~MorphologyImageFilter() {};
00128   void PrintSelf(std::ostream& os, Indent indent) const;
00129 
00131   void  ThreadedGenerateData (const OutputImageRegionType& 
00132                               outputRegionForThread,
00133                               int threadId) ;
00134 
00138   virtual PixelType Evaluate(const SmartNeighborhoodIteratorType &nit,
00139                              const KernelType &kernel)=0;
00140 
00144   virtual PixelType Evaluate(const NeighborhoodIteratorType &nit,
00145                              const KernelType &kernel)=0;
00146 
00147 private:
00148   MorphologyImageFilter(const Self&); //purposely not implemented
00149   void operator=(const Self&); //purposely not implemented
00150 
00152   KernelType m_Kernel ;
00153 
00154 } ; // end of class
00155 
00156 } // end namespace itk
00157   
00158 #ifndef ITK_MANUAL_INSTANTIATION
00159 #include "itkMorphologyImageFilter.txx"
00160 #endif
00161 
00162 #endif

Generated at Wed Mar 12 01:13:07 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000