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

itkBinaryMedianImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkBinaryMedianImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/11 19:39:01 $
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 __itkBinaryMedianImageFilter_h
00018 #define __itkBinaryMedianImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkImage.h"
00022 
00023 namespace itk
00024 {
00047 template <class TInputImage, class TOutputImage>
00048 class ITK_EXPORT BinaryMedianImageFilter :
00049     public ImageToImageFilter< TInputImage, TOutputImage >
00050 {
00051 public:
00053   itkStaticConstMacro(InputImageDimension, unsigned int,
00054                       TInputImage::ImageDimension);
00055   itkStaticConstMacro(OutputImageDimension, unsigned int,
00056                       TOutputImage::ImageDimension);
00057 
00059   typedef TInputImage InputImageType;
00060   typedef TOutputImage OutputImageType;
00061 
00063   typedef BinaryMedianImageFilter Self;
00064   typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00065   typedef SmartPointer<Self> Pointer;
00066   typedef SmartPointer<const Self>  ConstPointer;
00067 
00069   itkNewMacro(Self);
00070 
00072   itkTypeMacro(BinaryMedianImageFilter, ImageToImageFilter);
00073   
00075   typedef typename InputImageType::PixelType InputPixelType;
00076   typedef typename OutputImageType::PixelType OutputPixelType;
00077 
00078   typedef typename InputImageType::RegionType InputImageRegionType;
00079   typedef typename OutputImageType::RegionType OutputImageRegionType;
00080 
00081   typedef typename InputImageType::SizeType InputSizeType;
00082 
00084   itkSetMacro(Radius, InputSizeType);
00085 
00087   itkGetConstReferenceMacro(Radius, InputSizeType);
00088   
00091   itkSetMacro(BackgroundValue, InputPixelType);
00092   itkSetMacro(ForegroundValue, InputPixelType);
00093 
00096   itkGetConstReferenceMacro(BackgroundValue, InputPixelType);
00097   itkGetConstReferenceMacro(ForegroundValue, InputPixelType);
00098  
00099 
00106   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00107 
00108 protected:
00109   BinaryMedianImageFilter();
00110   virtual ~BinaryMedianImageFilter() {}
00111   void PrintSelf(std::ostream& os, Indent indent) const;
00112 
00123   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00124                             int threadId );
00125 
00126 private:
00127   BinaryMedianImageFilter(const Self&); //purposely not implemented
00128   void operator=(const Self&); //purposely not implemented
00129 
00130   InputSizeType m_Radius;
00131 
00132   InputPixelType     m_ForegroundValue;
00133   InputPixelType     m_BackgroundValue;
00134 
00135 };
00136   
00137 } // end namespace itk
00138 
00139 #ifndef ITK_MANUAL_INSTANTIATION
00140 #include "itkBinaryMedianImageFilter.txx"
00141 #endif
00142 
00143 #endif

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