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

itkCovarianceCalculator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkCovarianceCalculator.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/11 19:57:14 $
00007   Version:   $Revision: 1.7 $
00008 
00009   Copyright (c) 2002 Insight 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 
00018 #ifndef __itkCovarianceCalculator_h
00019 #define __itkCovarianceCalculator_h
00020 
00021 #include "itkSampleAlgorithmBase.h"
00022 
00023 #include "itkVector.h"
00024 #include "itkMatrix.h"
00025 
00026 namespace itk{ 
00027 namespace Statistics{
00028   
00039 template< class TSample >
00040 class CovarianceCalculator :
00041       public SampleAlgorithmBase< TSample >
00042 {
00043 public:
00045   typedef CovarianceCalculator Self;
00046   typedef Object Superclass ;
00047   typedef SmartPointer<Self> Pointer;
00048 
00050   itkTypeMacro(CovarianceCalculator, Object);
00051   itkNewMacro(Self) ;
00052   
00053   itkStaticConstMacro(MeasurementVectorSize, unsigned int,
00054                       TSample::MeasurementVectorSize) ;
00055 
00057   typedef Vector< double, itkGetStaticConstMacro(MeasurementVectorSize) > MeanType ;
00058   typedef Matrix< double, itkGetStaticConstMacro(MeasurementVectorSize), itkGetStaticConstMacro(MeasurementVectorSize) > OutputType ;
00059 
00061   void SetMean(MeanType* mean) ;
00062 
00064   MeanType* GetMean() ;
00065 
00067   OutputType* GetOutput() ;
00068 
00069 protected:
00070   CovarianceCalculator() ;
00071   virtual ~CovarianceCalculator() {}
00072   void PrintSelf(std::ostream& os, Indent indent) const;
00073 
00075   void GenerateData() ;
00076 
00077 private:
00078   OutputType m_Output ;
00079   MeanType* m_Mean ;
00080 } ; // end of class
00081     
00082   } // end of namespace Statistics 
00083 } // end of namespace itk 
00084 
00085 #ifndef ITK_MANUAL_INSTANTIATION
00086 #include "itkCovarianceCalculator.txx"
00087 #endif
00088 
00089 #endif
00090 

Generated at Fri May 21 01:14:35 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000