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/07/26 15:54:54 $
00007   Version:   $Revision: 1.9 $
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 
00065   typedef unsigned int  MeasurementVectorSizeType;
00066 
00068   virtual void SetMeasurementVectorSize( MeasurementVectorSizeType );
00069   itkGetConstMacro( MeasurementVectorSize, MeasurementVectorSizeType ); 
00070   
00072   itkTypeMacro(DistanceMetric, MembershipFunctionBase);
00073 
00074   typedef Array< double > OriginType ;
00075 
00079   void SetOrigin(const OriginType& x) ;
00080   itkGetConstReferenceMacro(Origin, OriginType) ;
00081 
00084   virtual double Evaluate(const TVector &x) const = 0 ;
00085   
00087   virtual double Evaluate(const TVector &x1, const TVector &x2) const = 0 ;
00088   
00089 protected:
00090   DistanceMetric() { m_MeasurementVectorSize = 0; }
00091   virtual ~DistanceMetric() {}
00092   void PrintSelf(std::ostream& os, Indent indent) const;
00093 
00094   OriginType m_Origin ;
00095 
00096 private:
00097   MeasurementVectorSizeType m_MeasurementVectorSize;
00098   
00099 } ; // end of class
00100 
00101 } // end of namespace Statistics 
00102 } // end of namespace itk
00103 
00104 #ifndef ITK_MANUAL_INSTANTIATION
00105 #include "itkDistanceMetric.txx"
00106 #endif
00107 
00108 #endif
00109 
00110 
00111 
00112 
00113 
00114 
00115 

Generated at Tue Aug 30 16:43:37 2005 for ITK by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2000