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

itkKernelImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkKernelImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-08-12 12:08:09 $
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 __itkKernelImageFilter_h
00019 #define __itkKernelImageFilter_h
00020 
00021 #include "itkBoxImageFilter.h"
00022 #include "itkCastImageFilter.h"
00023 #include "itkFlatStructuringElement.h"
00024 
00025 
00026 namespace itk {
00027 
00040 template<class TInputImage, class TOutputImage, class TKernel/*=Neighborhood<bool, TInputImage::ImageDimension>*/ >
00041 class ITK_EXPORT KernelImageFilter : 
00042 public BoxImageFilter<TInputImage, TOutputImage>
00043 {
00044 public:
00046   typedef KernelImageFilter                         Self;
00047   typedef BoxImageFilter<TInputImage,TOutputImage>  Superclass;
00048   typedef SmartPointer<Self>                        Pointer;
00049   typedef SmartPointer<const Self>                  ConstPointer;
00050 
00052   itkNewMacro(Self);
00053 
00055   itkTypeMacro(KernelImageFilter,
00056                BoxImageFilter);
00057 
00059   typedef TInputImage                               InputImageType;
00060   typedef typename TInputImage::RegionType          RegionType;
00061   typedef typename TInputImage::SizeType            SizeType;
00062   typedef typename TInputImage::IndexType           IndexType;
00063   typedef typename TInputImage::OffsetType          OffsetType;
00064 
00065   typedef typename TInputImage::PixelType           InputPixelType;
00066   
00067   typedef TOutputImage                              OutputImageType;
00068   typedef typename TOutputImage::PixelType          OutputPixelType;
00069 
00070   typedef TKernel KernelType;
00071 
00073   itkStaticConstMacro(ImageDimension, unsigned int,
00074                       TInputImage::ImageDimension);
00075 
00077   typedef FlatStructuringElement< itkGetStaticConstMacro(ImageDimension) >
00078                                                     FlatKernelType;
00079 
00081   typedef typename TInputImage::SizeType RadiusType;
00082 
00084   virtual void SetKernel( const KernelType& kernel );
00085   itkGetConstReferenceMacro(Kernel, KernelType);
00087 
00089   virtual void SetRadius( const RadiusType & radius );
00090   virtual void SetRadius( const unsigned long & radius )
00091     {
00092     // needed because of the overloading of the method
00093     Superclass::SetRadius( radius );
00094     }
00096 
00097 protected:
00098   KernelImageFilter();
00099   ~KernelImageFilter() {};
00100 
00101   void PrintSelf(std::ostream& os, Indent indent) const;
00102 
00104   KernelType m_Kernel;
00105 
00106 private:
00107   KernelImageFilter(const Self&); //purposely not implemented
00108   void operator=(const Self&); //purposely not implemented
00109 
00110 };
00111 
00112 }
00113 
00114 #ifndef ITK_MANUAL_INSTANTIATION
00115 #include "itkKernelImageFilter.txx"
00116 #endif
00117 
00118 #endif
00119 

Generated at Tue Sep 15 03:40:52 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000