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 >
107 itkSetMacro(Epsilon,
double);
108 itkGetConstMacro(Epsilon,
double);
111 itkSetMacro(DoubleMax,
double);
112 itkGetConstMacro(DoubleMax,
double);
117 void PrintSelf(std::ostream & os,
Indent indent)
const override;
127 double m_Epsilon{1
e-100};
128 double m_DoubleMax{1
e+20};
130 void CalculateInverseCovariance();
135 #ifndef ITK_MANUAL_INSTANTIATION
136 #include "itkMahalanobisDistanceMetric.hxx"
vnl_matrix< double > CovarianceMatrixType
TVector MeasurementVectorType
Light weight base class for most itk classes.
this class declares common interfaces for distance functions.
CovarianceMatrixType m_InverseCovariance
CovarianceMatrixType m_Covariance
static constexpr double e
The base of the natural logarithm or Euler's number
typename Superclass::OriginType MeanVectorType
Control indentation during Print() invocation.
MahalanobisDistanceMetric class computes a Mahalanobis distance given a mean and covariance.
unsigned int MeasurementVectorSizeType