ITK
5.0.0
Insight Segmentation and Registration Toolkit
|
#include <itkGaussianMembershipFunction.h>
GaussianMembershipFunction models class membership through a multivariate Gaussian function.
GaussianMembershipFunction is a subclass of MembershipFunctionBase that models class membership (or likelihood) using a multivariate Gaussian function. The mean and covariance structure of the Gaussian 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 guaranteed 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>.
If the covariance is singular or nearly singular, the membership function behaves somewhat like 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 small but differentiable values everywher and increase sharply near the mean.
Definition at line 55 of file itkGaussianMembershipFunction.h.
Public Member Functions | |
double | Evaluate (const MeasurementVectorType &measurement) const override |
virtual const CovarianceMatrixType & | GetCovariance () const |
virtual const CovarianceMatrixType & | GetInverseCovariance () const |
virtual const MeanVectorType & | GetMean () const |
LightObject::Pointer | InternalClone () const override |
void | SetCovariance (const CovarianceMatrixType &cov) |
void | SetMean (const MeanVectorType &mean) |
Public Member Functions inherited from itk::Statistics::MembershipFunctionBase< TMeasurementVector > | |
virtual MeasurementVectorSizeType | GetMeasurementVectorSize () const |
virtual void | SetMeasurementVectorSize (MeasurementVectorSizeType s) |
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 |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
virtual const TimeStamp & | GetTimeStamp () 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 noexceptoverride |
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 |
Protected Member Functions | |
GaussianMembershipFunction () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~GaussianMembershipFunction () override=default | |
Protected Member Functions inherited from itk::Statistics::MembershipFunctionBase< TMeasurementVector > | |
MembershipFunctionBase () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~MembershipFunctionBase () override=default | |
Protected Member Functions inherited from itk::FunctionBase< TMeasurementVector, double > | |
FunctionBase ()=default | |
~FunctionBase () override=default | |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
virtual void | SetTimeStamp (const TimeStamp &time) |
~Object () override | |
Protected Member Functions inherited from itk::LightObject | |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Private Attributes | |
CovarianceMatrixType | m_Covariance |
bool | m_CovarianceNonsingular |
CovarianceMatrixType | m_InverseCovariance |
MeanVectorType | m_Mean |
double | m_PreFactor |
virtual const char * | GetNameOfClass () const |
virtual ::itk::LightObject::Pointer | CreateAnother () const |
static Pointer | New () |
Additional Inherited Members | |
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 Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount |
using itk::Statistics::GaussianMembershipFunction< TMeasurementVector >::ConstPointer = SmartPointer< const Self > |
Definition at line 65 of file itkGaussianMembershipFunction.h.
using itk::Statistics::GaussianMembershipFunction< TMeasurementVector >::CovarianceMatrixType = VariableSizeMatrix< double > |
Type of the covariance matrix
Definition at line 87 of file itkGaussianMembershipFunction.h.
using itk::Statistics::GaussianMembershipFunction< TMeasurementVector >::MeanVectorType = MeasurementVectorRealType |
Definition at line 84 of file itkGaussianMembershipFunction.h.
using itk::Statistics::GaussianMembershipFunction< TMeasurementVector >::MeasurementVectorRealType = typename itk::NumericTraits< MeasurementVectorType >::RealType |
Type of the mean vector. RealType on a vector-type is the same vector-type but with a real element type.
Definition at line 83 of file itkGaussianMembershipFunction.h.
using itk::Statistics::GaussianMembershipFunction< TMeasurementVector >::MeasurementVectorSizeType = typename Superclass::MeasurementVectorSizeType |
Length of each measurement vector
Definition at line 79 of file itkGaussianMembershipFunction.h.
using itk::Statistics::GaussianMembershipFunction< TMeasurementVector >::MeasurementVectorType = TMeasurementVector |
Typedef alias for the measurement vectors
Definition at line 76 of file itkGaussianMembershipFunction.h.
using itk::Statistics::GaussianMembershipFunction< TMeasurementVector >::MembershipFunctionPointer = typename Superclass::Pointer |
SmartPointer class for superclass
Definition at line 73 of file itkGaussianMembershipFunction.h.
using itk::Statistics::GaussianMembershipFunction< TMeasurementVector >::Pointer = SmartPointer< Self > |
Definition at line 64 of file itkGaussianMembershipFunction.h.
using itk::Statistics::GaussianMembershipFunction< TMeasurementVector >::Self = GaussianMembershipFunction |
Standard class type aliases
Definition at line 62 of file itkGaussianMembershipFunction.h.
using itk::Statistics::GaussianMembershipFunction< TMeasurementVector >::Superclass = MembershipFunctionBase< TMeasurementVector > |
Definition at line 63 of file itkGaussianMembershipFunction.h.
|
protected |
|
overrideprotecteddefault |
|
virtual |
Standard macros
Reimplemented from itk::Object.
|
overridevirtual |
Evaluate the probability density of a measurement vector.
Implements itk::Statistics::MembershipFunctionBase< TMeasurementVector >.
|
virtual |
|
virtual |
|
virtual |
Get the mean of the Gaussian distribution. Mean is a vector type similar to the measurement type but with a real element type.
|
virtual |
Standard macros
Reimplemented from itk::Statistics::MembershipFunctionBase< TMeasurementVector >.
|
overridevirtual |
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 |
Standard macros
|
overrideprotectedvirtual |
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::Object.
void itk::Statistics::GaussianMembershipFunction< TMeasurementVector >::SetCovariance | ( | const CovarianceMatrixType & | cov | ) |
Set the covariance matrix. Covariance matrix is a VariableSizeMatrix of doubles. The inverse of the covariance matrix and the normlization term for the multivariate Gaussian are calculate whenever the covaraince matrix is changed.
void itk::Statistics::GaussianMembershipFunction< TMeasurementVector >::SetMean | ( | const MeanVectorType & | mean | ) |
Set the mean of the Gaussian distribution. Mean is a vector type similar to the measurement type but with a real element type.
|
private |
Definition at line 126 of file itkGaussianMembershipFunction.h.
|
private |
Boolean to cache whether the covarinace is singular or nearly singular
Definition at line 137 of file itkGaussianMembershipFunction.h.
|
private |
Definition at line 130 of file itkGaussianMembershipFunction.h.
|
private |
Definition at line 125 of file itkGaussianMembershipFunction.h.
|
private |
Definition at line 134 of file itkGaussianMembershipFunction.h.