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

itkListSampleToHistogramGenerator.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkListSampleToHistogramGenerator.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/12/15 01:00:46 $ 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 __itkListSampleToHistogramGenerator_h 00018 #define __itkListSampleToHistogramGenerator_h 00019 00020 #include "itkObject.h" 00021 #include "itkListSampleBase.h" 00022 #include "itkHistogram.h" 00023 #include "itkStatisticsAlgorithm.h" 00024 #include "itkDenseFrequencyContainer.h" 00025 00026 namespace itk{ 00027 namespace Statistics{ 00028 00061 template< class TListSample, 00062 class THistogramMeasurement, 00063 class TFrequencyContainer = DenseFrequencyContainer< float > > 00064 class ITK_EXPORT ListSampleToHistogramGenerator : 00065 public Object 00066 { 00067 public: 00069 typedef ListSampleToHistogramGenerator Self; 00070 typedef Object Superclass; 00071 typedef SmartPointer<Self> Pointer; 00072 typedef SmartPointer<const Self> ConstPointer; 00073 00075 itkTypeMacro(ListSampleToHistogramGenerator, Object) ; 00076 00078 itkNewMacro(Self) ; 00079 00081 itkStaticConstMacro(MeasurementVectorSize, unsigned int, 00082 TListSample::MeasurementVectorSize); 00083 00084 typedef Histogram< THistogramMeasurement, 00085 itkGetStaticConstMacro(MeasurementVectorSize), 00086 TFrequencyContainer > HistogramType ; 00087 00088 typedef typename HistogramType::SizeType HistogramSizeType ; 00089 00091 void SetListSample(const TListSample* list) 00092 { m_List = list ; } 00093 00094 void SetMarginalScale(float scale) 00095 { m_MarginalScale = scale ; } 00096 00097 void SetNumberOfBins(HistogramSizeType sizes) 00098 { m_Sizes = sizes ; } 00099 00100 const HistogramType* GetOutput() const 00101 { return m_Histogram ; } 00102 00103 void Update() 00104 { this->GenerateData() ; } 00105 00106 protected: 00107 ListSampleToHistogramGenerator() ; 00108 virtual ~ListSampleToHistogramGenerator() {} 00109 void GenerateData() ; 00110 00111 private: 00112 const TListSample* m_List ; 00113 typename HistogramType::Pointer m_Histogram ; 00114 HistogramSizeType m_Sizes ; 00115 float m_MarginalScale ; 00116 00117 } ; // end of class 00118 00119 } // end of namespace Statistics 00120 } // end of namespace itk 00121 00122 #ifndef ITK_MANUAL_INSTANTIATION 00123 #include "itkListSampleToHistogramGenerator.txx" 00124 #endif 00125 00126 #endif

Generated at Sun Apr 1 02:37:11 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000