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/12/17 17:50:35 $
00007   Version:   $Revision: 1.13 $
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 "itkConstNeighborhoodIterator.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 
00102   typedef TKernel KernelType;
00103   
00105   typedef typename KernelType::ConstIterator KernelIteratorType ;
00106   
00108   typedef typename KernelType::SizeType RadiusType ;
00109 
00111   itkSetMacro(Kernel, KernelType);
00112 
00114   itkGetConstReferenceMacro(Kernel, KernelType);
00115   
00121   void GenerateInputRequestedRegion() ;
00122 
00123 protected:
00124   MorphologyImageFilter();
00125   ~MorphologyImageFilter() {};
00126   void PrintSelf(std::ostream& os, Indent indent) const;
00127 
00129   void  ThreadedGenerateData (const OutputImageRegionType& 
00130                               outputRegionForThread,
00131                               int threadId) ;
00132 
00135   virtual PixelType Evaluate(const NeighborhoodIteratorType &nit,
00136                              const KernelType &kernel)=0;
00137 
00138 private:
00139   MorphologyImageFilter(const Self&); //purposely not implemented
00140   void operator=(const Self&); //purposely not implemented
00141 
00143   KernelType m_Kernel ;
00144 
00145 } ; // end of class
00146 
00147 } // end namespace itk
00148   
00149 #ifndef ITK_MANUAL_INSTANTIATION
00150 #include "itkMorphologyImageFilter.txx"
00151 #endif
00152 
00153 #endif

Generated at Fri May 21 01:15:04 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000