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

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: 2005/11/21 02:40:48 $
00007   Version:   $Revision: 1.12 $
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 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) ;
00078 
00081   virtual double Evaluate(const TVector &x) const = 0 ;
00082   
00084   virtual double Evaluate(const TVector &x1, const TVector &x2) const = 0 ;
00085   
00086 protected:
00087   DistanceMetric();
00088   virtual ~DistanceMetric() {}
00089   void PrintSelf(std::ostream& os, Indent indent) const;
00090 
00091   OriginType m_Origin ;
00092 } ; // end of class
00093 
00094 } // end of namespace Statistics 
00095 } // end of namespace itk
00096 
00097 #ifndef ITK_MANUAL_INSTANTIATION
00098 #include "itkDistanceMetric.txx"
00099 #endif
00100 
00101 #endif
00102 
00103 
00104 
00105 
00106 
00107 
00108 

Generated at Wed May 24 23:03:45 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000