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

itkWeightedCovarianceCalculator.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkWeightedCovarianceCalculator.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/12/09 16:53:08 $ 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 __itkWeightedCovarianceCalculator_h 00018 #define __itkWeightedCovarianceCalculator_h 00019 00020 #include "itkVector.h" 00021 #include "itkMatrix.h" 00022 #include "itkSampleAlgorithmBase.h" 00023 00024 namespace itk{ 00025 namespace Statistics{ 00026 00034 template< class TSample > 00035 class WeightedCovarianceCalculator : 00036 public SampleAlgorithmBase< TSample > 00037 { 00038 public: 00040 typedef WeightedCovarianceCalculator Self; 00041 typedef SampleAlgorithmBase< TSample > Superclass ; 00042 typedef SmartPointer<Self> Pointer; 00043 typedef SmartPointer<const Self> ConstPointer; 00044 00046 itkTypeMacro(WeightedCovarianceCalculator, SampleAlgorithmBase); 00047 itkNewMacro(Self) ; 00048 00049 itkStaticConstMacro(MeasurementVectorSize, unsigned int, 00050 TSample::MeasurementVectorSize); 00051 00053 typedef typename TSample::MeasurementVectorType MeasurementVectorType ; 00054 00056 typedef FunctionBase< MeasurementVectorType, double > WeightFunctionType ; 00057 00059 typedef Matrix< double, 00060 itkGetStaticConstMacro(MeasurementVectorSize), 00061 itkGetStaticConstMacro(MeasurementVectorSize) > 00062 OutputType ; 00063 00065 typedef Vector< double, itkGetStaticConstMacro(MeasurementVectorSize) > 00066 MeanType ; 00067 00069 typedef Array< double > WeightArrayType ; 00070 00072 void SetWeights(WeightArrayType* array) ; 00073 00075 WeightArrayType* GetWeights() ; 00076 00080 void SetWeightFunction(WeightFunctionType* func) ; 00081 00083 WeightFunctionType* GetWeightFunction() ; 00084 00086 void SetMean(MeanType* mean) ; 00087 00089 MeanType* GetMean() ; 00090 00092 OutputType* GetOutput() ; 00093 00094 protected: 00095 WeightedCovarianceCalculator() ; 00096 virtual ~WeightedCovarianceCalculator() ; 00097 void PrintSelf(std::ostream& os, Indent indent) const; 00098 00100 void GenerateData() ; 00101 00102 void ComputeCovarianceWithGivenMean() ; 00103 00104 void ComputeCovarianceWithoutGivenMean() ; 00105 00106 private: 00107 OutputType* m_Output ; 00108 MeanType* m_Mean ; 00109 MeanType* m_InternalMean ; 00110 WeightArrayType* m_Weights ; 00111 WeightFunctionType* m_WeightFunction ; 00112 } ; // end of class 00113 00114 } // end of namespace Statistics 00115 } // end of namespace itk 00116 00117 #ifndef ITK_MANUAL_INSTANTIATION 00118 #include "itkWeightedCovarianceCalculator.txx" 00119 #endif 00120 00121 #endif 00122

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