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

Numerics/Statistics/itkDistanceMetric.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkDistanceMetric.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-03-04 15:23:46 $
00007   Version:   $Revision: 1.13 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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
00064                                              MeasurementVectorSizeType;
00065 
00067   itkTypeMacro(DistanceMetric, MembershipFunctionBase);
00068 
00069   typedef Array< double > OriginType;
00070 
00072   virtual void SetMeasurementVectorSize( const MeasurementVectorSizeType );
00073 
00077   void SetOrigin(const OriginType& x);
00078   itkGetConstReferenceMacro(Origin, OriginType);
00080 
00083   virtual double Evaluate(const TVector &x) const = 0;
00084 
00086   virtual double Evaluate(const TVector &x1, const TVector &x2) const = 0;
00087 
00088 protected:
00089   DistanceMetric();
00090   virtual ~DistanceMetric() {}
00091   void PrintSelf(std::ostream& os, Indent indent) const;
00092 
00093   OriginType m_Origin;
00094 }; // end of class
00095 
00096 } // end of namespace Statistics 
00097 } // end of namespace itk
00098 
00099 #ifndef ITK_MANUAL_INSTANTIATION
00100 #include "itkDistanceMetric.txx"
00101 #endif
00102 
00103 #endif
00104 

Generated at Thu May 28 09:50:29 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000