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

itkOtsuThresholdImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkOtsuThresholdImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2004/07/31 12:21:42 $
00007   Version:   $Revision: 1.1 $
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 __itkOtsuThresholdImageFilter_h
00018 #define __itkOtsuThresholdImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkFixedArray.h"
00022 
00023 namespace itk {
00024 
00041 template<class TInputImage, class TOutputImage>
00042 class ITK_EXPORT OtsuThresholdImageFilter : 
00043     public ImageToImageFilter<TInputImage, TOutputImage>
00044 {
00045 public:
00047   typedef OtsuThresholdImageFilter Self;
00048   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00049   typedef SmartPointer<Self>        Pointer;
00050   typedef SmartPointer<const Self>  ConstPointer;
00051   
00053   itkNewMacro(Self);  
00054 
00056   itkTypeMacro(OtsuThresholdImageFilter, ImageToImageFilter);
00057   
00059   typedef typename TInputImage::PixelType   InputPixelType;
00060   typedef typename TOutputImage::PixelType   OutputPixelType;
00061   
00063   typedef typename TInputImage::Pointer InputImagePointer;
00064   typedef typename TOutputImage::Pointer OutputImagePointer;
00065 
00066   typedef typename TInputImage::SizeType  InputSizeType;
00067   typedef typename TInputImage::IndexType  InputIndexType;
00068   typedef typename TInputImage::RegionType InputImageRegionType;
00069   typedef typename TOutputImage::SizeType  OutputSizeType;
00070   typedef typename TOutputImage::IndexType  OutputIndexType;
00071   typedef typename TOutputImage::RegionType OutputImageRegionType;
00072 
00073 
00075   itkStaticConstMacro(InputImageDimension, unsigned int,
00076                       TInputImage::ImageDimension ) ;
00077   itkStaticConstMacro(OutputImageDimension, unsigned int,
00078                       TOutputImage::ImageDimension ) ;
00079 
00082   itkSetMacro(OutsideValue,OutputPixelType);
00083   
00085   itkGetMacro(OutsideValue,OutputPixelType);
00086 
00089   itkSetMacro(InsideValue,OutputPixelType);
00090   
00092   itkGetMacro(InsideValue,OutputPixelType);
00093 
00095   itkSetClampMacro( NumberOfHistogramBins, unsigned long, 1, 
00096                     NumericTraits<unsigned long>::max() );
00097   itkGetMacro( NumberOfHistogramBins, unsigned long );
00098 
00100   itkGetMacro(Threshold,InputPixelType);
00101 
00102 
00103 protected:
00104   OtsuThresholdImageFilter();
00105   ~OtsuThresholdImageFilter(){};
00106   void PrintSelf(std::ostream& os, Indent indent) const;
00107 
00108   void GenerateInputRequestedRegion();
00109   void GenerateData ();
00110 
00111 private:
00112   OtsuThresholdImageFilter(const Self&); //purposely not implemented
00113   void operator=(const Self&); //purposely not implemented
00114 
00115   InputPixelType      m_Threshold;
00116   OutputPixelType     m_InsideValue;
00117   OutputPixelType     m_OutsideValue;
00118   unsigned long       m_NumberOfHistogramBins;
00119 
00120 } ; // end of class
00121 
00122 } // end namespace itk
00123   
00124 #ifndef ITK_MANUAL_INSTANTIATION
00125 #include "itkOtsuThresholdImageFilter.txx"
00126 #endif
00127 
00128 #endif

Generated at Wed May 24 23:49:07 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000