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: 2010-02-02 13:45:16 $
00007   Version:   $Revision: 1.14 $
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 SmartPointer< Self >              Pointer;
00064   typedef SmartPointer<const Self>          ConstPointer;
00065   typedef typename Superclass::MeasurementVectorSizeType
00066                                              MeasurementVectorSizeType;
00067 
00069   itkTypeMacro(DistanceMetric, MembershipFunctionBase);
00070 
00071   typedef Array< double > OriginType;
00072 
00074   virtual void SetMeasurementVectorSize( const MeasurementVectorSizeType );
00075 
00079   void SetOrigin(const OriginType& x);
00080   itkGetConstReferenceMacro(Origin, OriginType);
00082 
00085   virtual double Evaluate(const TVector &x) const = 0;
00086 
00088   virtual double Evaluate(const TVector &x1, const TVector &x2) const = 0;
00089 
00090 protected:
00091   DistanceMetric();
00092   virtual ~DistanceMetric() {}
00093   void PrintSelf(std::ostream& os, Indent indent) const;
00094 
00095   OriginType m_Origin;
00096 }; // end of class
00097 
00098 } // end of namespace Statistics 
00099 } // end of namespace itk
00100 
00101 #ifndef ITK_MANUAL_INSTANTIATION
00102 #include "itkDistanceMetric.txx"
00103 #endif
00104 
00105 #endif
00106 

Generated at Fri Apr 16 18:15:15 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000