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"
46template <
typename TVector>
62 using typename Superclass::MeasurementVectorType;
65 using typename Superclass::MeasurementVectorSizeType;
113 itkSetMacro(Epsilon,
double);
114 itkGetConstMacro(Epsilon,
double);
117 itkSetMacro(DoubleMax,
double);
118 itkGetConstMacro(DoubleMax,
double);
134 double m_Epsilon{ 1
e-100 };
135 double m_DoubleMax{ 1
e+20 };
143#ifndef ITK_MANUAL_INSTANTIATION
144# include "itkMahalanobisDistanceMetric.hxx"
Control indentation during Print() invocation.
Light weight base class for most itk classes.
this class declares common interfaces for distance functions.
TVector MeasurementVectorType
unsigned int MeasurementVectorSizeType
MahalanobisDistanceMetric class computes a Mahalanobis distance given a mean and covariance.
void SetInverseCovariance(const CovarianceMatrixType &invcov)
typename Superclass::OriginType MeanVectorType
const MeanVectorType & GetMean() const
~MahalanobisDistanceMetric() override=default
MahalanobisDistanceMetric()
void CalculateInverseCovariance()
void SetMeasurementVectorSize(MeasurementVectorSizeType) override
void PrintSelf(std::ostream &os, Indent indent) const override
void SetCovariance(const CovarianceMatrixType &cov)
double Evaluate(const MeasurementVectorType &x1, const MeasurementVectorType &x2) const override
double Evaluate(const MeasurementVectorType &measurement) const override
void SetMean(const MeanVectorType &mean)
vnl_matrix< double > CovarianceMatrixType
static constexpr double e
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....