00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkDistanceMetric_h
00018 #define __itkDistanceMetric_h
00019
00020 #include "itkMembershipFunctionBase.h"
00021 #include "itkArray.h"
00022
00023 namespace itk{
00024 namespace Statistics{
00025
00056 template< class TVector >
00057 class ITK_EXPORT DistanceMetric : public MembershipFunctionBase< TVector >
00058 {
00059 public:
00061 typedef DistanceMetric Self;
00062 typedef MembershipFunctionBase< TVector > Superclass;
00063 typedef typename Superclass::MeasurementVectorSizeType MeasurementVectorSizeType;
00064
00066 itkTypeMacro(DistanceMetric, MembershipFunctionBase);
00067
00068 typedef Array< double > OriginType ;
00069
00071 virtual void SetMeasurementVectorSize( const MeasurementVectorSizeType );
00072
00076 void SetOrigin(const OriginType& x) ;
00077 itkGetConstReferenceMacro(Origin, OriginType) ;
00079
00082 virtual double Evaluate(const TVector &x) const = 0 ;
00083
00085 virtual double Evaluate(const TVector &x1, const TVector &x2) const = 0 ;
00086
00087 protected:
00088 DistanceMetric();
00089 virtual ~DistanceMetric() {}
00090 void PrintSelf(std::ostream& os, Indent indent) const;
00091
00092 OriginType m_Origin ;
00093 } ;
00094
00095 }
00096 }
00097
00098 #ifndef ITK_MANUAL_INSTANTIATION
00099 #include "itkDistanceMetric.txx"
00100 #endif
00101
00102 #endif
00103
00104
00105
00106
00107
00108
00109
00110