ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkMahalanobisDistanceMembershipFunction.h>
MahalanobisDistanceMembershipFunction models class membership using Mahalanobis distance.
MahalanobisDistanceMembershipFunction is a subclass of MembershipFunctionBase that models class membership (or likelihood) using the Mahalanobis distance. The mean and covariance structure of the Mahalanobis distance are established using the methods SetMean() and SetCovariance(). The mean is a vector-type that is the same vector-type as the measurement vector but guarenteed to have a real element type. For instance, if the measurement type is an Vector<int,3>, then the mean is Vector<double,3>. If the measurement type is a VariableLengthVector<float>, then the mean is VariableLengthVector<double>. In contrast to this behavior, the covariance is always a VariableSizeMatrix<double>.
Note that this membership function does not return a probability density function in contrast to the GaussianMembershipFunction.
Note, as is the case in other packages (MATLAB, R), the value returned by this membership function is the squared distance.
If the covariance is singular or nearly singular, the membership function behaves somewhat like (the opposite of) an impulse located at the mean. In this case, we specify the covariance to be a diagonal matrix with large values along the diagonal. This membership function, therefore, will return large but differentiable values everywhere and decay to zero sharply near the mean.
Definition at line 62 of file itkMahalanobisDistanceMembershipFunction.h.
typedef SmartPointer< const Self > itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::ConstPointer |
Reimplemented from itk::Statistics::MembershipFunctionBase< TVector >.
Definition at line 70 of file itkMahalanobisDistanceMembershipFunction.h.
typedef VariableSizeMatrix< double > itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::CovarianceMatrixType |
Type of the covariance matrix
Definition at line 92 of file itkMahalanobisDistanceMembershipFunction.h.
typedef MeasurementVectorRealType itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::MeanVectorType |
Definition at line 89 of file itkMahalanobisDistanceMembershipFunction.h.
typedef itk::NumericTraits< MeasurementVectorType >::RealType itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::MeasurementVectorRealType |
Type of the mean vector. RealType on a vector-type is the same vector-type but with a real element type.
Definition at line 88 of file itkMahalanobisDistanceMembershipFunction.h.
typedef Superclass::MeasurementVectorSizeType itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::MeasurementVectorSizeType |
Typedef to represent the length of measurement vectors
Reimplemented from itk::Statistics::MembershipFunctionBase< TVector >.
Definition at line 84 of file itkMahalanobisDistanceMembershipFunction.h.
typedef TVector itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::MeasurementVectorType |
Typedef alias for the measurement vectors
Reimplemented from itk::Statistics::MembershipFunctionBase< TVector >.
Definition at line 81 of file itkMahalanobisDistanceMembershipFunction.h.
typedef Superclass::Pointer itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::MembershipFunctionPointer |
SmartPointer class for superclass
Definition at line 74 of file itkMahalanobisDistanceMembershipFunction.h.
typedef SmartPointer< Self > itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::Pointer |
Reimplemented from itk::Statistics::MembershipFunctionBase< TVector >.
Definition at line 69 of file itkMahalanobisDistanceMembershipFunction.h.
typedef MahalanobisDistanceMembershipFunction itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::Self |
Standard class typedefs
Reimplemented from itk::Statistics::MembershipFunctionBase< TVector >.
Definition at line 67 of file itkMahalanobisDistanceMembershipFunction.h.
typedef MembershipFunctionBase< TVector > itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::Superclass |
Reimplemented from itk::Statistics::MembershipFunctionBase< TVector >.
Definition at line 68 of file itkMahalanobisDistanceMembershipFunction.h.
itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::MahalanobisDistanceMembershipFunction | ( | void | ) | [protected] |
virtual itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::~MahalanobisDistanceMembershipFunction | ( | void | ) | [inline, protected, virtual] |
Definition at line 125 of file itkMahalanobisDistanceMembershipFunction.h.
virtual::itk::LightObject::Pointer itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::CreateAnother | ( | void | ) | const [virtual] |
Strandard macros
Reimplemented from itk::Object.
double itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::Evaluate | ( | const MeasurementVectorType & | measurement | ) | const [virtual] |
Evaluate the Mahalanobis distance of a measurement using the prescribed mean and covariance. Note that the Mahalanobis distance is not a probability density. The square of the distance is returned.
Implements itk::Statistics::MembershipFunctionBase< TVector >.
virtual const CovarianceMatrixType& itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::GetCovariance | ( | ) | [virtual] |
Get the covariance matrix. Covariance matrix is a VariableSizeMatrix of doubles.
virtual const MeanVectorType& itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::GetMean | ( | ) | [virtual] |
Get the mean of the Mahalanobis distance. Mean is a vector type similar to the measurement type but with a real element type.
virtual const char* itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::GetNameOfClass | ( | ) | const [virtual] |
Strandard macros
Reimplemented from itk::Statistics::MembershipFunctionBase< TVector >.
virtual LightObject::Pointer itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::InternalClone | ( | ) | const [virtual] |
Method to clone a membership function, i.e. create a new instance of the same type of membership function and configure its ivars to match.
Reimplemented from itk::LightObject.
static Pointer itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::New | ( | ) | [static] |
Strandard macros
Reimplemented from itk::Object.
void itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::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::MembershipFunctionBase< TVector >.
void itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::SetCovariance | ( | const CovarianceMatrixType & | cov | ) |
Set the covariance matrix. Covariance matrix is a VariableSizeMatrix of doubles. The inverse of the covariance matrix is calculated whenever the covaraince matrix is changed.
void itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::SetMean | ( | const MeanVectorType & | mean | ) |
Set the mean used in the Mahalanobis distance. Mean is a vector type similar to the measurement type but with a real element type.
CovarianceMatrixType itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::m_Covariance [private] |
Definition at line 130 of file itkMahalanobisDistanceMembershipFunction.h.
bool itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::m_CovarianceNonsingular [private] |
Boolean to cache whether the covarinace is singular or nearly singular
Definition at line 137 of file itkMahalanobisDistanceMembershipFunction.h.
CovarianceMatrixType itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::m_InverseCovariance [private] |
Definition at line 134 of file itkMahalanobisDistanceMembershipFunction.h.
MeanVectorType itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::m_Mean [private] |
Definition at line 129 of file itkMahalanobisDistanceMembershipFunction.h.