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

itkEuclideanDistance.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkEuclideanDistance.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:45 $ 00007 Version: $Revision: 1.7 $ 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 __itkEuclideanDistance_h 00018 #define __itkEuclideanDistance_h 00019 00020 #include "itkNumericTraits.h" 00021 #include "itkFixedArray.h" 00022 #include "itkDistanceMetric.h" 00023 00024 namespace itk{ 00025 namespace Statistics{ 00026 00037 template< class TVector > 00038 class ITK_EXPORT EuclideanDistance : 00039 public DistanceMetric< TVector > 00040 { 00041 public: 00043 typedef EuclideanDistance Self; 00044 typedef DistanceMetric< TVector > Superclass; 00045 typedef SmartPointer< Self > Pointer ; 00046 00048 itkStaticConstMacro(VectorLength, unsigned int, TVector::Length); 00049 00051 itkTypeMacro(EuclideanDistance, DistanceMetric); 00052 00054 itkNewMacro(Self) ; 00055 00057 typedef typename TVector::ValueType ValueType ; 00058 00060 double Evaluate(const TVector &x) const ; 00061 00063 double Evaluate(const TVector &x1, const TVector &x2) const ; 00064 00067 double Evaluate(const ValueType &a, const ValueType &b) const ; 00068 00071 bool IsWithinRange(const TVector &x, const double radius) const ; 00072 00073 protected: 00074 EuclideanDistance() {} 00075 virtual ~EuclideanDistance() {} 00076 virtual void PrintSelf(std::ostream& os, Indent indent) const 00077 { Superclass::PrintSelf(os, indent) ; } 00078 00079 } ; // end of class 00080 00081 } // end of namespace Statistics 00082 } // end of namespace itk 00083 00084 #ifndef ITK_MANUAL_INSTANTIATION 00085 #include "itkEuclideanDistance.txx" 00086 #endif 00087 00088 #endif 00089 00090 00091 00092 00093 00094 00095

Generated at Sat Mar 31 02:17:37 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000