Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::Statistics::DistanceMetric< TVector > Class Template Reference

this class declares common interfaces for distance functions. More...

#include <itkDistanceMetric.h>

Inheritance diagram for itk::Statistics::DistanceMetric< TVector >:

Inheritance graph
[legend]
Collaboration diagram for itk::Statistics::DistanceMetric< TVector >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef DistanceMetric Self
typedef MembershipFunctionBase<
TVector > 
Superclass
typedef Superclass::MeasurementVectorSizeType MeasurementVectorSizeType
typedef Array< double > OriginType

Public Member Functions

virtual const char * GetNameOfClass () const
virtual void SetMeasurementVectorSize (const MeasurementVectorSizeType)
virtual double Evaluate (const TVector &x) const=0
virtual double Evaluate (const TVector &x1, const TVector &x2) const=0
void SetOrigin (const OriginType &x)
virtual const OriginTypeGetOrigin ()

Protected Member Functions

 DistanceMetric ()
virtual ~DistanceMetric ()
void PrintSelf (std::ostream &os, Indent indent) const

Protected Attributes

OriginType m_Origin

Detailed Description

template<class TVector>
class itk::Statistics::DistanceMetric< TVector >

this class declares common interfaces for distance functions.

As a function derived from MembershipFunctionBase, users use Evaluate method to get result.

To use this function in the context of MembershipFunction, users should first set the origin by calling SetOrigin() function, then call Evaluate() method with a point to get the distance between the origin point and the evaluation point.

If users want to the distance between two points without setting the origin point. Use two argument version of Evaluate() function.

The class can be templated over any container that holds data elements. The containter is expected to provide access to its elements with the [] operator. It must also implement a Size() that returns the length of the container. It must also contain a typedef "ValueType" that defines the data-type held by the container. (In other words it will support itk::Vector, FixedArray, Array ).

Recent API changes: The static const macro to get the length of a measurement vector, MeasurementVectorSize has been removed to allow the length of a measurement vector to be specified at run time. Please use the function GetMeasurementVectorSize() instead. OriginType typedef has been changed from Vector to Array.

Definition at line 57 of file itkDistanceMetric.h.


Member Typedef Documentation

template<class TVector>
typedef Superclass::MeasurementVectorSizeType itk::Statistics::DistanceMetric< TVector >::MeasurementVectorSizeType
 

Typedef for the length of each measurement vector

Reimplemented from itk::Statistics::MembershipFunctionBase< TVector >.

Reimplemented in itk::Statistics::EuclideanDistance< TVector >, and itk::Statistics::EuclideanDistance< ParameterType >.

Definition at line 63 of file itkDistanceMetric.h.

template<class TVector>
typedef Array< double > itk::Statistics::DistanceMetric< TVector >::OriginType
 

Definition at line 68 of file itkDistanceMetric.h.

template<class TVector>
typedef DistanceMetric itk::Statistics::DistanceMetric< TVector >::Self
 

Standard typedefs

Reimplemented from itk::Statistics::MembershipFunctionBase< TVector >.

Reimplemented in itk::Statistics::EuclideanDistance< TVector >, and itk::Statistics::EuclideanDistance< ParameterType >.

Definition at line 61 of file itkDistanceMetric.h.

template<class TVector>
typedef MembershipFunctionBase< TVector > itk::Statistics::DistanceMetric< TVector >::Superclass
 

Reimplemented from itk::Statistics::MembershipFunctionBase< TVector >.

Reimplemented in itk::Statistics::EuclideanDistance< TVector >, and itk::Statistics::EuclideanDistance< ParameterType >.

Definition at line 62 of file itkDistanceMetric.h.


Constructor & Destructor Documentation

template<class TVector>
itk::Statistics::DistanceMetric< TVector >::DistanceMetric  )  [protected]
 

template<class TVector>
virtual itk::Statistics::DistanceMetric< TVector >::~DistanceMetric  )  [inline, protected, virtual]
 

Definition at line 89 of file itkDistanceMetric.h.


Member Function Documentation

template<class TVector>
virtual double itk::Statistics::DistanceMetric< TVector >::Evaluate const TVector &  x1,
const TVector &  x2
const [pure virtual]
 

Gets the distance between x1 and x2 points

Implemented in itk::Statistics::EuclideanDistance< TVector >, and itk::Statistics::EuclideanDistance< ParameterType >.

template<class TVector>
virtual double itk::Statistics::DistanceMetric< TVector >::Evaluate const TVector &  x  )  const [pure virtual]
 

Gets the distance between the origin point and x. This function work with SetOrigin() function

Implements itk::Statistics::MembershipFunctionBase< TVector >.

Implemented in itk::Statistics::EuclideanDistance< TVector >, and itk::Statistics::EuclideanDistance< ParameterType >.

template<class TVector>
virtual const char* itk::Statistics::DistanceMetric< TVector >::GetNameOfClass  )  const [virtual]
 

Run-time type information (and related methods).

Reimplemented from itk::Statistics::MembershipFunctionBase< TVector >.

Reimplemented in itk::Statistics::EuclideanDistance< TVector >, and itk::Statistics::EuclideanDistance< ParameterType >.

template<class TVector>
virtual const OriginType& itk::Statistics::DistanceMetric< TVector >::GetOrigin  )  [virtual]
 

Sets the origin point that will be used for the single point version Evaluate() function. This function is necessary part of implementing MembershipFunctionBase's Evaluate() interface

template<class TVector>
void itk::Statistics::DistanceMetric< 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 >.

template<class TVector>
virtual void itk::Statistics::DistanceMetric< TVector >::SetMeasurementVectorSize const  MeasurementVectorSizeType  )  [virtual]
 

Set the length of each measurement vector.

Implements itk::Statistics::MembershipFunctionBase< TVector >.

template<class TVector>
void itk::Statistics::DistanceMetric< TVector >::SetOrigin const OriginType x  ) 
 

Sets the origin point that will be used for the single point version Evaluate() function. This function is necessary part of implementing MembershipFunctionBase's Evaluate() interface


Member Data Documentation

template<class TVector>
OriginType itk::Statistics::DistanceMetric< TVector >::m_Origin [protected]
 

Definition at line 92 of file itkDistanceMetric.h.


The documentation for this class was generated from the following file:
Generated at Thu May 25 03:03:38 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000