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

itkObjectMorphologyImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkObjectMorphologyImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/01/10 17:25:26 $
00007   Version:   $Revision: 1.2 $
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 __itkObjectMorphologyImageFilter_h
00018 #define __itkObjectMorphologyImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkNeighborhoodIterator.h"
00022 #include "itkNeighborhood.h"
00023 #include "itkConstSliceIterator.h"
00024 #include "itkImageBoundaryCondition.h"
00025 #include "itkImageRegionIterator.h"
00026 
00027 namespace itk {
00028 
00071 template<class TInputImage, class TOutputImage, class TKernel>
00072 class ITK_EXPORT ObjectMorphologyImageFilter : 
00073   public ImageToImageFilter<TInputImage, TOutputImage>
00074 {
00075 public:
00077   typedef ObjectMorphologyImageFilter Self;
00078   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00079   typedef SmartPointer<Self>        Pointer;
00080   typedef SmartPointer<const Self>  ConstPointer;
00081   
00083   itkTypeMacro(ObjectMorphologyImageFilter, ImageToImageFilter);
00084   
00086   typedef TInputImage InputImageType;
00087   typedef TOutputImage OutputImageType;
00088   typedef typename TInputImage::RegionType RegionType ;
00089   typedef typename TInputImage::SizeType SizeType ;
00090   typedef typename TInputImage::IndexType IndexType ;
00091   typedef typename TInputImage::PixelType PixelType ;
00092   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00093   
00095   itkStaticConstMacro(ImageDimension, unsigned int,
00096                       TInputImage::ImageDimension);
00097 
00099   typedef ConstNeighborhoodIterator<TInputImage> 
00100     InputNeighborhoodIteratorType ;
00101 
00102   typedef NeighborhoodIterator<TOutputImage> 
00103     OutputNeighborhoodIteratorType ;
00104 
00106   typedef TKernel KernelType;
00107   
00109   typedef typename KernelType::ConstIterator KernelIteratorType ;
00110   
00112   typedef typename KernelType::SizeType RadiusType ;
00113 
00115   itkSetMacro(Kernel, KernelType);
00116 
00118   itkGetConstReferenceMacro(Kernel, KernelType);
00119 
00121   itkGetMacro(ObjectValue, PixelType);
00122 
00124   itkSetMacro(ObjectValue, PixelType);
00125   
00131   void GenerateInputRequestedRegion() ;
00132 
00133 protected:
00134   ObjectMorphologyImageFilter();
00135   ~ObjectMorphologyImageFilter() {};
00136   void PrintSelf(std::ostream& os, Indent indent) const;
00137 
00139   void  ThreadedGenerateData (const OutputImageRegionType& 
00140                               outputRegionForThread,
00141                               int threadId) ;
00142 
00145   virtual void Evaluate(OutputNeighborhoodIteratorType &nit,
00146                              const KernelType &kernel)=0;
00147 
00151   bool IsObjectPixelOnBoundary(const InputNeighborhoodIteratorType &nit);
00152 
00154   KernelType m_Kernel ;
00155 
00157   PixelType m_ObjectValue;
00158 
00159 private:
00160   ObjectMorphologyImageFilter(const Self&); //purposely not implemented
00161   void operator=(const Self&); //purposely not implemented
00162 
00163 } ; // end of class
00164 
00165 } // end namespace itk
00166   
00167 #ifndef ITK_MANUAL_INSTANTIATION
00168 #include "itkObjectMorphologyImageFilter.txx"
00169 #endif
00170 
00171 #endif

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