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: 2009-04-23 03:53:36 $
00007   Version:   $Revision: 1.4 $
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 );
00080 
00083   itkSetMacro(OutsideValue,OutputPixelType);
00084 
00086   itkGetConstMacro(OutsideValue,OutputPixelType);
00087 
00090   itkSetMacro(InsideValue,OutputPixelType);
00091 
00093   itkGetConstMacro(InsideValue,OutputPixelType);
00094 
00096   itkSetClampMacro( NumberOfHistogramBins, unsigned long, 1, 
00097                     NumericTraits<unsigned long>::max() );
00098   itkGetConstMacro( NumberOfHistogramBins, unsigned long );
00100 
00102   itkGetConstMacro(Threshold,InputPixelType);
00103 
00104 #ifdef ITK_USE_CONCEPT_CHECKING
00105 
00106   itkConceptMacro(OutputEqualityComparableCheck,
00107     (Concept::EqualityComparable<OutputPixelType>));
00108   itkConceptMacro(InputOStreamWritableCheck,
00109     (Concept::OStreamWritable<InputPixelType>));
00110   itkConceptMacro(OutputOStreamWritableCheck,
00111     (Concept::OStreamWritable<OutputPixelType>));
00112 
00114 #endif
00115 protected:
00116   OtsuThresholdImageFilter();
00117   ~OtsuThresholdImageFilter(){};
00118   void PrintSelf(std::ostream& os, Indent indent) const;
00120 
00121   void GenerateInputRequestedRegion();
00122   void GenerateData ();
00123 
00124 private:
00125   OtsuThresholdImageFilter(const Self&); //purposely not implemented
00126   void operator=(const Self&); //purposely not implemented
00127 
00128   InputPixelType      m_Threshold;
00129   OutputPixelType     m_InsideValue;
00130   OutputPixelType     m_OutsideValue;
00131   unsigned long       m_NumberOfHistogramBins;
00132 
00133 }; // end of class
00134 
00135 } // end namespace itk
00136   
00137 #ifndef ITK_MANUAL_INSTANTIATION
00138 #include "itkOtsuThresholdImageFilter.txx"
00139 #endif
00140 
00141 #endif
00142 

Generated at Mon Jul 12 2010 19:23:37 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000