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: 2008-10-09 15:31:36 $
00007   Version:   $Revision: 1.6 $
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 #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);
00058 
00060   typedef TInputImage  InputImageType;
00061   typedef TOutputImage OutputImageType;
00062 
00064   typedef BinaryMedianImageFilter                              Self;
00065   typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00066   typedef SmartPointer<Self>                                   Pointer;
00067   typedef SmartPointer<const Self>                             ConstPointer;
00068 
00070   itkNewMacro(Self);
00071 
00073   itkTypeMacro(BinaryMedianImageFilter, ImageToImageFilter);
00074 
00076   typedef typename InputImageType::PixelType  InputPixelType;
00077   typedef typename OutputImageType::PixelType OutputPixelType;
00078 
00079   typedef typename InputImageType::RegionType  InputImageRegionType;
00080   typedef typename OutputImageType::RegionType OutputImageRegionType;
00081 
00082   typedef typename InputImageType::SizeType InputSizeType;
00083 
00085   itkSetMacro(Radius, InputSizeType);
00086 
00088   itkGetConstReferenceMacro(Radius, InputSizeType);
00089 
00092   itkSetMacro(BackgroundValue, InputPixelType);
00093   itkSetMacro(ForegroundValue, InputPixelType);
00095 
00098   itkGetConstReferenceMacro(BackgroundValue, InputPixelType);
00099   itkGetConstReferenceMacro(ForegroundValue, InputPixelType);
00101 
00102 
00109   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00110 
00111 #ifdef ITK_USE_CONCEPT_CHECKING
00112 
00113   itkConceptMacro(InputEqualityComparableCheck,
00114     (Concept::EqualityComparable<typename TInputImage::PixelType>));
00115   itkConceptMacro(InputConvertibleToOutputCheck,
00116     (Concept::Convertible<typename TInputImage::PixelType,
00117                           typename TOutputImage::PixelType>));
00118   itkConceptMacro(SameDimensionCheck,
00119     (Concept::SameDimension<InputImageDimension, OutputImageDimension>));
00120   itkConceptMacro(InputOStreamWritableCheck,
00121     (Concept::OStreamWritable<typename TInputImage::PixelType>));
00122 
00124 #endif
00125 
00126 protected:
00127   BinaryMedianImageFilter();
00128   virtual ~BinaryMedianImageFilter() {}
00129   void PrintSelf(std::ostream& os, Indent indent) const;
00130 
00141   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00142                             int threadId );
00143 
00144 private:
00145   BinaryMedianImageFilter(const Self&); //purposely not implemented
00146   void operator=(const Self&); //purposely not implemented
00147 
00148   InputSizeType m_Radius;
00149 
00150   InputPixelType     m_ForegroundValue;
00151   InputPixelType     m_BackgroundValue;
00152 
00153 };
00154   
00155 } // end namespace itk
00156 
00157 #ifndef ITK_MANUAL_INSTANTIATION
00158 #include "itkBinaryMedianImageFilter.txx"
00159 #endif
00160 
00161 #endif
00162 

Generated at Mon Jul 12 2010 17:49:30 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000