18 #ifndef itkMahalanobisDistanceMetric_h
19 #define itkMahalanobisDistanceMetric_h
21 #include "vnl/vnl_vector.h"
22 #include "vnl/vnl_vector_ref.h"
23 #include "vnl/vnl_transpose.h"
24 #include "vnl/vnl_matrix.h"
25 #include "vnl/algo/vnl_matrix_inverse.h"
26 #include "vnl/algo/vnl_determinant.h"
45 template<
typename TVector >
96 itkGetConstReferenceMacro(InverseCovariance, CovarianceMatrixType);
107 itkSetMacro(Epsilon,
double);
108 itkGetConstMacro(Epsilon,
double);
111 itkSetMacro(DoubleMax,
double);
112 itkGetConstMacro(DoubleMax,
double);
116 virtual ~MahalanobisDistanceMetric(
void) {}
135 #ifndef ITK_MANUAL_INSTANTIATION
136 #include "itkMahalanobisDistanceMetric.hxx"
MahalanobisDistanceMetric Self
Light weight base class for most itk classes.
Superclass::MeasurementVectorType MeasurementVectorType
SmartPointer< Self > Pointer
SmartPointer< const Self > ConstPointer
Superclass::OriginType MeanVectorType
DistanceMetric< TVector > Superclass
Array< double > OriginType
double Evaluate(const MeasurementVectorType &measurement) const override
void SetCovariance(const CovarianceMatrixType &cov)
TVector MeasurementVectorType
this class declares common interfaces for distance functions.
const MeanVectorType & GetMean() const
CovarianceMatrixType m_InverseCovariance
CovarianceMatrixType m_Covariance
void CalculateInverseCovariance()
virtual void SetMeasurementVectorSize(MeasurementVectorSizeType) override
void SetInverseCovariance(const CovarianceMatrixType &invcov)
void SetMean(const MeanVectorType &mean)
Control indentation during Print() invocation.
void PrintSelf(std::ostream &os, Indent indent) const override
Superclass::MeasurementVectorSizeType MeasurementVectorSizeType
MahalanobisDistanceMetric class computes a Mahalanobis distance given a mean and covariance.
vnl_matrix< double > CovarianceMatrixType
unsigned int MeasurementVectorSizeType