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

itk::Statistics::CovarianceCalculator< TSample > Class Template Reference

Calculates the covariance matrix of the target sample data. More...

#include <itkCovarianceCalculator.h>

Inheritance diagram for itk::Statistics::CovarianceCalculator< TSample >:

Inheritance graph
[legend]
Collaboration diagram for itk::Statistics::CovarianceCalculator< TSample >:

Collaboration graph
[legend]
List of all members.

[NOHEADER]

virtual const char * GetClassName () const
Pointer New ()

Public Types

typedef CovarianceCalculator Self
typedef Object Superclass
typedef SmartPointer< SelfPointer
typedef Vector< double, itkGetStaticConstMacro(MeasurementVectorSize) MeanType )
typedef Matrix< double, itkGetStaticConstMacro(MeasurementVectorSize), itkGetStaticConstMacro(MeasurementVectorSize) OutputType )

Public Member Functions

 itkStaticConstMacro (MeasurementVectorSize, unsigned int, TSample::MeasurementVectorSize)
void SetMean (MeanType *mean)
MeanTypeGetMean ()
OutputTypeGetOutput ()

Protected Member Functions

 CovarianceCalculator ()
virtual ~CovarianceCalculator ()
void PrintSelf (std::ostream &os, Indent indent) const
void GenerateData ()
void ComputeCovarianceWithGivenMean ()
void ComputeCovarianceWithoutGivenMean ()

Detailed Description

template<class TSample>
class itk::Statistics::CovarianceCalculator< TSample >

Calculates the covariance matrix of the target sample data.

If there is a mean vector provided by the SetMean method, this calculator will do the caculation as follows: Let $\Sigma$ denotes covariance matrix for the sample, then: When $x_{i}$ is $i$th component of a measurement vector $\vec x$, $\mu_{i}$ is the $i$th componet of the $\vec\mu$, and the $\sigma_{ij}$ is the $ij$th componet $\Sigma$, $\sigma_{ij} = (x_{i} - \mu_{i})(x_{j} - \mu_{j})$

Without the plugged in mean vector, this calculator will perform the single pass mean and covariance calculation algorithm.

Definition at line 45 of file itkCovarianceCalculator.h.


Member Typedef Documentation

template<class TSample>
typedef Vector< double, itkGetStaticConstMacro(MeasurementVectorSize) itk::Statistics::CovarianceCalculator< TSample >::MeanType)
 

Typedef for the mean output Definition at line 63 of file itkCovarianceCalculator.h.

template<class TSample>
typedef Matrix< double, itkGetStaticConstMacro(MeasurementVectorSize), itkGetStaticConstMacro(MeasurementVectorSize) itk::Statistics::CovarianceCalculator< TSample >::OutputType)
 

Typedef for the mean output Definition at line 64 of file itkCovarianceCalculator.h.

template<class TSample>
typedef SmartPointer<Self> itk::Statistics::CovarianceCalculator< TSample >::Pointer
 

Reimplemented from itk::Statistics::SampleAlgorithmBase< TSample >.

Definition at line 52 of file itkCovarianceCalculator.h.

template<class TSample>
typedef CovarianceCalculator itk::Statistics::CovarianceCalculator< TSample >::Self
 

Standard class typedefs.

Reimplemented from itk::Statistics::SampleAlgorithmBase< TSample >.

Definition at line 50 of file itkCovarianceCalculator.h.

template<class TSample>
typedef Object itk::Statistics::CovarianceCalculator< TSample >::Superclass
 

Reimplemented from itk::Statistics::SampleAlgorithmBase< TSample >.

Definition at line 51 of file itkCovarianceCalculator.h.


Constructor & Destructor Documentation

template<class TSample>
itk::Statistics::CovarianceCalculator< TSample >::CovarianceCalculator  )  [protected]
 

template<class TSample>
virtual itk::Statistics::CovarianceCalculator< TSample >::~CovarianceCalculator  )  [protected, virtual]
 


Member Function Documentation

template<class TSample>
void itk::Statistics::CovarianceCalculator< TSample >::ComputeCovarianceWithGivenMean  )  [protected]
 

Calculates the covariance matrix using the given mean

template<class TSample>
void itk::Statistics::CovarianceCalculator< TSample >::ComputeCovarianceWithoutGivenMean  )  [protected]
 

Calculates the covariance matrix and the mean in a single pass

template<class TSample>
void itk::Statistics::CovarianceCalculator< TSample >::GenerateData  )  [protected, virtual]
 

Calculates the covariance and save it. This method calls ComputeCovarianceWithGivenMean, if the user provides mean vector using SetMean method. Otherwise, it calls ComputeCovarianceWithoutGivenMethod depending on

Reimplemented from itk::Statistics::SampleAlgorithmBase< TSample >.

template<class TSample>
virtual const char* itk::Statistics::CovarianceCalculator< TSample >::GetClassName  )  const [virtual]
 

Standard Macros

Reimplemented from itk::Statistics::SampleAlgorithmBase< TSample >.

template<class TSample>
MeanType* itk::Statistics::CovarianceCalculator< TSample >::GetMean  ) 
 

Returns the sample pointer

template<class TSample>
OutputType* itk::Statistics::CovarianceCalculator< TSample >::GetOutput  ) 
 

Returns the covariance matrix of the target sample data

template<class TSample>
itk::Statistics::CovarianceCalculator< TSample >::itkStaticConstMacro MeasurementVectorSize  ,
unsigned  int,
TSample::MeasurementVectorSize 
 

template<class TSample>
Pointer itk::Statistics::CovarianceCalculator< TSample >::New  )  [static]
 

Standard Macros

Reimplemented from itk::Statistics::SampleAlgorithmBase< TSample >.

template<class TSample>
void itk::Statistics::CovarianceCalculator< TSample >::PrintSelf std::ostream &  os,
Indent  indent
const [protected, virtual]
 

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::Statistics::SampleAlgorithmBase< TSample >.

template<class TSample>
void itk::Statistics::CovarianceCalculator< TSample >::SetMean MeanType mean  ) 
 

Stores the sample pointer


The documentation for this class was generated from the following file:
Generated at Sat Mar 31 03:13:11 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000