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

itkScalarImageToHistogramGenerator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkScalarImageToHistogramGenerator.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/08/24 15:16:56 $
00007   Version:   $Revision: 1.7 $
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 __itkScalarImageToHistogramGenerator_h
00018 #define __itkScalarImageToHistogramGenerator_h
00019 
00020 
00021 #include "itkScalarImageToListAdaptor.h"
00022 #include "itkListSampleToHistogramGenerator.h"
00023 #include "itkObject.h"
00024 
00025 
00026 namespace itk {
00027 namespace Statistics {
00028 
00029 template< class TImageType >
00030 class ScalarImageToHistogramGenerator : public Object
00031 {
00032 public:
00034   typedef ScalarImageToHistogramGenerator  Self ;
00035   typedef Object Superclass;
00036   typedef SmartPointer<Self> Pointer;
00037   typedef SmartPointer<const Self> ConstPointer;
00038 
00040   itkTypeMacro(ScalarImageToHistogramGenerator, Object) ;
00041 
00043   itkNewMacro(Self) ;
00044 
00045   typedef TImageType                                      ImageType;
00046   typedef itk::Statistics::ScalarImageToListAdaptor< 
00047                                               ImageType 
00048                                                       >   AdaptorType;
00049   typedef typename AdaptorType::Pointer                   AdaptorPointer;
00050   typedef typename ImageType::PixelType                   PixelType;
00051 
00052   typedef itk::Statistics::ListSampleToHistogramGenerator< 
00053                                   AdaptorType, 
00054                                   PixelType,
00055                                   DenseFrequencyContainer
00056                                                           > GeneratorType;
00057 
00058   typedef typename GeneratorType::Pointer                   GeneratorPointer;
00059 
00060   typedef typename GeneratorType::HistogramType             HistogramType;
00061   typedef typename HistogramType::Pointer                   HistogramPointer;
00062   typedef typename HistogramType::ConstPointer              HistogramConstPointer;
00063 
00064 public:
00065 
00067   void Compute( void );
00068 
00070   void SetInput( const ImageType * );
00071   
00075   const HistogramType * GetOutput() const;
00076   
00078   void SetNumberOfBins( unsigned int numberOfBins );
00079  
00081   void SetMarginalScale( double marginalScale );
00082 
00083 
00084 protected:
00085   ScalarImageToHistogramGenerator();
00086   virtual ~ScalarImageToHistogramGenerator() {};
00087   void PrintSelf(std::ostream& os, Indent indent) const;
00088 
00089 
00090 private:
00091 
00092   AdaptorPointer      m_ImageToListAdaptor;
00093 
00094   GeneratorPointer    m_HistogramGenerator;
00095   
00096   ScalarImageToHistogramGenerator(const Self&); //purposely not implemented
00097   void operator=(const Self&); //purposely not implemented
00098 };
00099 
00100 
00101 } // end of namespace Statistics 
00102 } // end of namespace itk 
00103 
00104 #ifndef ITK_MANUAL_INSTANTIATION
00105 #include "itkScalarImageToHistogramGenerator.txx"
00106 #endif
00107 
00108 #endif

Generated at Thu May 25 00:00:08 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000