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

itkMedianImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkMedianImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/11 19:39:01 $
00007   Version:   $Revision: 1.3 $
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 __itkMedianImageFilter_h
00018 #define __itkMedianImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkImage.h"
00022 
00023 namespace itk
00024 {
00044 template <class TInputImage, class TOutputImage>
00045 class ITK_EXPORT MedianImageFilter :
00046     public ImageToImageFilter< TInputImage, TOutputImage >
00047 {
00048 public:
00050   itkStaticConstMacro(InputImageDimension, unsigned int,
00051                       TInputImage::ImageDimension);
00052   itkStaticConstMacro(OutputImageDimension, unsigned int,
00053                       TOutputImage::ImageDimension);
00054 
00056   typedef TInputImage InputImageType;
00057   typedef TOutputImage OutputImageType;
00058 
00060   typedef MedianImageFilter Self;
00061   typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00062   typedef SmartPointer<Self> Pointer;
00063   typedef SmartPointer<const Self>  ConstPointer;
00064 
00066   itkNewMacro(Self);
00067 
00069   itkTypeMacro(MedianImageFilter, ImageToImageFilter);
00070   
00072   typedef typename InputImageType::PixelType InputPixelType;
00073   typedef typename OutputImageType::PixelType OutputPixelType;
00074 
00075   typedef typename InputImageType::RegionType InputImageRegionType;
00076   typedef typename OutputImageType::RegionType OutputImageRegionType;
00077 
00078   typedef typename InputImageType::SizeType InputSizeType;
00079 
00081   itkSetMacro(Radius, InputSizeType);
00082 
00084   itkGetConstReferenceMacro(Radius, InputSizeType);
00085   
00092   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00093 
00094 protected:
00095   MedianImageFilter();
00096   virtual ~MedianImageFilter() {}
00097   void PrintSelf(std::ostream& os, Indent indent) const;
00098 
00109   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00110                             int threadId );
00111 
00112 private:
00113   MedianImageFilter(const Self&); //purposely not implemented
00114   void operator=(const Self&); //purposely not implemented
00115 
00116   InputSizeType m_Radius;
00117 };
00118   
00119 } // end namespace itk
00120 
00121 #ifndef ITK_MANUAL_INSTANTIATION
00122 #include "itkMedianImageFilter.txx"
00123 #endif
00124 
00125 #endif

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