ITK  5.1.0
Insight Toolkit
Public Types | List of all members
itk::Statistics::MahalanobisDistanceMetric< TVector > Class Template Reference

#include <itkMahalanobisDistanceMetric.h>

+ Inheritance diagram for itk::Statistics::MahalanobisDistanceMetric< TVector >:
+ Collaboration diagram for itk::Statistics::MahalanobisDistanceMetric< TVector >:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = MahalanobisDistanceMetric
 
using Superclass = DistanceMetric< TVector >
 
- Public Types inherited from itk::Statistics::DistanceMetric< TVector >
using ConstPointer = SmartPointer< const Self >
 
using MeasurementVectorSizeType = unsigned int
 
using MeasurementVectorType = TVector
 
using OriginType = Array< double >
 
using Pointer = SmartPointer< Self >
 
using Self = DistanceMetric
 
using Superclass = FunctionBase< TVector, double >
 
- Public Types inherited from itk::FunctionBase< TVector, double >
using ConstPointer = SmartPointer< const Self >
 
using InputType = TVector
 
using OutputType = double
 
using Pointer = SmartPointer< Self >
 
using Self = FunctionBase
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 
using MeasurementVectorType = typename Superclass::MeasurementVectorType
 
using MeasurementVectorSizeType = typename Superclass::MeasurementVectorSizeType
 
using MeanVectorType = typename Superclass::OriginType
 
using CovarianceMatrixType = vnl_matrix< double >
 
MeanVectorType m_Mean
 
CovarianceMatrixType m_Covariance
 
CovarianceMatrixType m_InverseCovariance
 
double m_Epsilon { 1e-100 }
 
double m_DoubleMax { 1e+20 }
 
virtual const char * GetNameOfClass () const
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
void SetMeasurementVectorSize (MeasurementVectorSizeType) override
 
void SetMean (const MeanVectorType &mean)
 
const MeanVectorTypeGetMean () const
 
void SetCovariance (const CovarianceMatrixType &cov)
 
virtual const CovarianceMatrixTypeGetCovariance () const
 
void SetInverseCovariance (const CovarianceMatrixType &invcov)
 
virtual const CovarianceMatrixTypeGetInverseCovariance () const
 
double Evaluate (const MeasurementVectorType &measurement) const override
 
double Evaluate (const MeasurementVectorType &x1, const MeasurementVectorType &x2) const override
 
virtual void SetEpsilon (double _arg)
 
virtual double GetEpsilon () const
 
virtual void SetDoubleMax (double _arg)
 
virtual double GetDoubleMax () const
 
static Pointer New ()
 
 MahalanobisDistanceMetric ()
 
 ~MahalanobisDistanceMetric () override=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void CalculateInverseCovariance ()
 

Additional Inherited Members

- Public Member Functions inherited from itk::Statistics::DistanceMetric< TVector >
virtual MeasurementVectorSizeType GetMeasurementVectorSize () const
 
virtual const OriginTypeGetOrigin () const
 
void SetOrigin (const OriginType &x)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Protected Member Functions inherited from itk::Statistics::DistanceMetric< TVector >
 DistanceMetric ()
 
 ~DistanceMetric () override=default
 
- Protected Member Functions inherited from itk::FunctionBase< TVector, double >
 FunctionBase ()=default
 
 ~FunctionBase () override=default
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

template<typename TVector>
class itk::Statistics::MahalanobisDistanceMetric< TVector >

MahalanobisDistanceMetric class computes a Mahalanobis distance given a mean and covariance.

See also
DistanceMetric
EuclideanDistanceMetric
EuclideanSquareDistanceMetric

Definition at line 47 of file itkMahalanobisDistanceMetric.h.

Member Typedef Documentation

◆ ConstPointer

template<typename TVector >
using itk::Statistics::MahalanobisDistanceMetric< TVector >::ConstPointer = SmartPointer<const Self>

Definition at line 54 of file itkMahalanobisDistanceMetric.h.

◆ CovarianceMatrixType

template<typename TVector >
using itk::Statistics::MahalanobisDistanceMetric< TVector >::CovarianceMatrixType = vnl_matrix<double>

Type used for representing the covariance matrix

Definition at line 71 of file itkMahalanobisDistanceMetric.h.

◆ MeanVectorType

template<typename TVector >
using itk::Statistics::MahalanobisDistanceMetric< TVector >::MeanVectorType = typename Superclass::OriginType

Type used for representing the mean vector

Definition at line 68 of file itkMahalanobisDistanceMetric.h.

◆ MeasurementVectorSizeType

template<typename TVector >
using itk::Statistics::MahalanobisDistanceMetric< TVector >::MeasurementVectorSizeType = typename Superclass::MeasurementVectorSizeType

Typedef to represent the length of measurement vectors

Definition at line 65 of file itkMahalanobisDistanceMetric.h.

◆ MeasurementVectorType

template<typename TVector >
using itk::Statistics::MahalanobisDistanceMetric< TVector >::MeasurementVectorType = typename Superclass::MeasurementVectorType

Typedef to represent the measurement vector type

Definition at line 62 of file itkMahalanobisDistanceMetric.h.

◆ Pointer

template<typename TVector >
using itk::Statistics::MahalanobisDistanceMetric< TVector >::Pointer = SmartPointer<Self>

Definition at line 53 of file itkMahalanobisDistanceMetric.h.

◆ Self

template<typename TVector >
using itk::Statistics::MahalanobisDistanceMetric< TVector >::Self = MahalanobisDistanceMetric

Standard class type aliases

Definition at line 51 of file itkMahalanobisDistanceMetric.h.

◆ Superclass

template<typename TVector >
using itk::Statistics::MahalanobisDistanceMetric< TVector >::Superclass = DistanceMetric<TVector>

Definition at line 52 of file itkMahalanobisDistanceMetric.h.

Constructor & Destructor Documentation

◆ MahalanobisDistanceMetric()

template<typename TVector >
itk::Statistics::MahalanobisDistanceMetric< TVector >::MahalanobisDistanceMetric ( )
protected

Typedef to represent the measurement vector type

◆ ~MahalanobisDistanceMetric()

template<typename TVector >
itk::Statistics::MahalanobisDistanceMetric< TVector >::~MahalanobisDistanceMetric ( )
overrideprotecteddefault

Typedef to represent the measurement vector type

Member Function Documentation

◆ CalculateInverseCovariance()

template<typename TVector >
void itk::Statistics::MahalanobisDistanceMetric< TVector >::CalculateInverseCovariance ( )
private

Typedef to represent the measurement vector type

◆ CreateAnother()

template<typename TVector >
virtual::itk::LightObject::Pointer itk::Statistics::MahalanobisDistanceMetric< TVector >::CreateAnother ( ) const
virtual

Typedef to represent the measurement vector type

Reimplemented from itk::Object.

◆ Evaluate() [1/2]

template<typename TVector >
double itk::Statistics::MahalanobisDistanceMetric< TVector >::Evaluate ( const MeasurementVectorType measurement) const
overridevirtual

Method to get probability of an instance. The return value is the value of the density function, not probability.

Implements itk::Statistics::DistanceMetric< TVector >.

◆ Evaluate() [2/2]

template<typename TVector >
double itk::Statistics::MahalanobisDistanceMetric< TVector >::Evaluate ( const MeasurementVectorType x1,
const MeasurementVectorType x2 
) const
overridevirtual

Gets the distance between x1 and x2.

Implements itk::Statistics::DistanceMetric< TVector >.

◆ GetCovariance()

template<typename TVector >
virtual const CovarianceMatrixType& itk::Statistics::MahalanobisDistanceMetric< TVector >::GetCovariance ( ) const
virtual

Method to get covariance matrix

◆ GetDoubleMax()

template<typename TVector >
virtual double itk::Statistics::MahalanobisDistanceMetric< TVector >::GetDoubleMax ( ) const
virtual

Typedef to represent the measurement vector type

◆ GetEpsilon()

template<typename TVector >
virtual double itk::Statistics::MahalanobisDistanceMetric< TVector >::GetEpsilon ( ) const
virtual

Typedef to represent the measurement vector type

◆ GetInverseCovariance()

template<typename TVector >
virtual const CovarianceMatrixType& itk::Statistics::MahalanobisDistanceMetric< TVector >::GetInverseCovariance ( ) const
virtual

Method to get covariance matrix

◆ GetMean()

template<typename TVector >
const MeanVectorType& itk::Statistics::MahalanobisDistanceMetric< TVector >::GetMean ( ) const

Method to get mean

◆ GetNameOfClass()

template<typename TVector >
virtual const char* itk::Statistics::MahalanobisDistanceMetric< TVector >::GetNameOfClass ( ) const
virtual

Strandard macros

Reimplemented from itk::Statistics::DistanceMetric< TVector >.

◆ New()

template<typename TVector >
static Pointer itk::Statistics::MahalanobisDistanceMetric< TVector >::New ( )
static

Typedef to represent the measurement vector type

◆ PrintSelf()

template<typename TVector >
void itk::Statistics::MahalanobisDistanceMetric< TVector >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

Typedef to represent the measurement vector type

Reimplemented from itk::Statistics::DistanceMetric< TVector >.

◆ SetCovariance()

template<typename TVector >
void itk::Statistics::MahalanobisDistanceMetric< TVector >::SetCovariance ( const CovarianceMatrixType cov)

Method to set covariance matrix Also, this function calculates inverse covariance and pre factor of MahalanobisDistance Distribution to speed up GetProbability

◆ SetDoubleMax()

template<typename TVector >
virtual void itk::Statistics::MahalanobisDistanceMetric< TVector >::SetDoubleMax ( double  _arg)
virtual

Typedef to represent the measurement vector type

◆ SetEpsilon()

template<typename TVector >
virtual void itk::Statistics::MahalanobisDistanceMetric< TVector >::SetEpsilon ( double  _arg)
virtual

Set/Get tolerance values

◆ SetInverseCovariance()

template<typename TVector >
void itk::Statistics::MahalanobisDistanceMetric< TVector >::SetInverseCovariance ( const CovarianceMatrixType invcov)

Method to set inverse covariance matrix

◆ SetMean()

template<typename TVector >
void itk::Statistics::MahalanobisDistanceMetric< TVector >::SetMean ( const MeanVectorType mean)

Method to set mean

◆ SetMeasurementVectorSize()

template<typename TVector >
void itk::Statistics::MahalanobisDistanceMetric< TVector >::SetMeasurementVectorSize ( MeasurementVectorSizeType  )
overridevirtual

Set the length of each measurement vector.

Reimplemented from itk::Statistics::DistanceMetric< TVector >.

Member Data Documentation

◆ m_Covariance

template<typename TVector >
CovarianceMatrixType itk::Statistics::MahalanobisDistanceMetric< TVector >::m_Covariance
private

Typedef to represent the measurement vector type

Definition at line 128 of file itkMahalanobisDistanceMetric.h.

◆ m_DoubleMax

template<typename TVector >
double itk::Statistics::MahalanobisDistanceMetric< TVector >::m_DoubleMax { 1e+20 }
private

Typedef to represent the measurement vector type

Definition at line 135 of file itkMahalanobisDistanceMetric.h.

◆ m_Epsilon

template<typename TVector >
double itk::Statistics::MahalanobisDistanceMetric< TVector >::m_Epsilon { 1e-100 }
private

Typedef to represent the measurement vector type

Definition at line 134 of file itkMahalanobisDistanceMetric.h.

◆ m_InverseCovariance

template<typename TVector >
CovarianceMatrixType itk::Statistics::MahalanobisDistanceMetric< TVector >::m_InverseCovariance
private

Typedef to represent the measurement vector type

Definition at line 132 of file itkMahalanobisDistanceMetric.h.

◆ m_Mean

template<typename TVector >
MeanVectorType itk::Statistics::MahalanobisDistanceMetric< TVector >::m_Mean
private

Typedef to represent the measurement vector type

Definition at line 127 of file itkMahalanobisDistanceMetric.h.


The documentation for this class was generated from the following file: