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: 2004/11/04 20:40:41 $
00007   Version:   $Revision: 1.8 $
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 "itkVector.h"
00022 
00023 namespace itk{ 
00024 namespace Statistics{
00025 
00042 template< class TVector >
00043 class ITK_EXPORT DistanceMetric : public MembershipFunctionBase< TVector >
00044 {
00045 public:
00047   typedef DistanceMetric Self;
00048   typedef MembershipFunctionBase< TVector > Superclass;
00049 
00051   itkStaticConstMacro(VectorLength, unsigned int, TVector::Length);
00052   
00054   itkTypeMacro(DistanceMetric, MembershipFunctionBase);
00055 
00056   typedef Vector< double, itkGetStaticConstMacro(VectorLength) > OriginType ;
00057 
00061   void SetOrigin(const OriginType& x) ;
00062   itkGetConstReferenceMacro(Origin, OriginType) ;
00063 
00066   virtual double Evaluate(const TVector &x) const = 0 ;
00067   
00069   virtual double Evaluate(const TVector &x1, const TVector &x2) const = 0 ;
00070   
00071 protected:
00072   void PrintSelf(std::ostream& os, Indent indent) const;
00073 
00074   OriginType m_Origin ;
00075 } ; // end of class
00076 
00077 } // end of namespace Statistics 
00078 } // end of namespace itk
00079 
00080 #ifndef ITK_MANUAL_INSTANTIATION
00081 #include "itkDistanceMetric.txx"
00082 #endif
00083 
00084 #endif
00085 
00086 
00087 
00088 
00089 
00090 
00091 

Generated at Tue Mar 29 23:50:17 2005 for ITK by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2000