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

itkOtsuMultipleThresholdsImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkOtsuMultipleThresholdsImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/01/14 22:32:53 $
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 __itkOtsuMultipleThresholdsImageFilter_h
00018 #define __itkOtsuMultipleThresholdsImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkFixedArray.h"
00022 
00023 namespace itk {
00024 
00043 template<class TInputImage, class TOutputImage>
00044 class ITK_EXPORT OtsuMultipleThresholdsImageFilter : 
00045     public ImageToImageFilter<TInputImage, TOutputImage>
00046 {
00047 public:
00049   typedef OtsuMultipleThresholdsImageFilter Self;
00050   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00051   typedef SmartPointer<Self>        Pointer;
00052   typedef SmartPointer<const Self>  ConstPointer;
00053   
00055   itkNewMacro(Self);  
00056 
00058   itkTypeMacro(OtsuMultipleThresholdsImageFilter, ImageToImageFilter);
00059   
00061   typedef typename TInputImage::PixelType   InputPixelType;
00062   typedef typename TOutputImage::PixelType   OutputPixelType;
00063   
00065   typedef typename TInputImage::Pointer InputImagePointer;
00066   typedef typename TOutputImage::Pointer OutputImagePointer;
00067 
00068   typedef typename TInputImage::SizeType  InputSizeType;
00069   typedef typename TInputImage::IndexType  InputIndexType;
00070   typedef typename TInputImage::RegionType InputImageRegionType;
00071   typedef typename TOutputImage::SizeType  OutputSizeType;
00072   typedef typename TOutputImage::IndexType  OutputIndexType;
00073   typedef typename TOutputImage::RegionType OutputImageRegionType;
00074 
00076   typedef std::vector<InputPixelType> ThresholdVectorType;
00077   
00079   itkStaticConstMacro(InputImageDimension, unsigned int,
00080                       TInputImage::ImageDimension ) ;
00081   itkStaticConstMacro(OutputImageDimension, unsigned int,
00082                       TOutputImage::ImageDimension ) ;
00083 
00085   itkSetClampMacro( NumberOfHistogramBins, unsigned long, 1, NumericTraits<unsigned long>::max() );
00086   itkGetConstMacro( NumberOfHistogramBins, unsigned long );
00087 
00089   itkSetClampMacro(NumberOfThresholds, unsigned long, 1, NumericTraits<unsigned long>::max() );
00090   itkGetConstMacro(NumberOfThresholds,unsigned long);
00091 
00093   itkSetClampMacro(LabelOffset,OutputPixelType, NumericTraits<OutputPixelType>::Zero,NumericTraits<OutputPixelType>::max() );
00094   itkGetConstMacro(LabelOffset,OutputPixelType);
00095 
00097   const ThresholdVectorType & GetThresholds() const
00098     {
00099       return m_Thresholds;
00100     }
00101 
00102 
00103 protected:
00104   OtsuMultipleThresholdsImageFilter();
00105   ~OtsuMultipleThresholdsImageFilter(){};
00106   void PrintSelf(std::ostream& os, Indent indent) const;
00107 
00108   void GenerateInputRequestedRegion();
00109   void GenerateData ();
00110 
00111 private:
00112   OtsuMultipleThresholdsImageFilter(const Self&); //purposely not implemented
00113   void operator=(const Self&); //purposely not implemented
00114 
00115   unsigned long           m_NumberOfHistogramBins;
00116   unsigned long           m_NumberOfThresholds;
00117   OutputPixelType         m_LabelOffset;
00118   ThresholdVectorType     m_Thresholds;
00119 
00120 
00121 } ; // end of class
00122 
00123 } // end namespace itk
00124   
00125 #ifndef ITK_MANUAL_INSTANTIATION
00126 #include "itkOtsuMultipleThresholdsImageFilter.txx"
00127 #endif
00128 
00129 #endif

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