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

itkManhattanDistanceMetric.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkManhattanDistanceMetric.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-05-02 05:43:58 $
00007   Version:   $Revision: 1.1 $
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 __itkManhattanDistanceMetric_h
00018 #define __itkManhattanDistanceMetric_h
00019 
00020 #include "itkNumericTraits.h"
00021 #include "itkDistanceMetric.h"
00022 #include "itkMeasurementVectorTraits.h"
00023 
00024 namespace itk  { 
00025 namespace Statistics  {
00026 
00035 template< class TVector >
00036 class ITK_EXPORT ManhattanDistanceMetric : 
00037     public DistanceMetric< TVector >
00038 {
00039 public:
00041   typedef ManhattanDistanceMetric       Self;
00042   typedef DistanceMetric< TVector >     Superclass;
00043   typedef SmartPointer< Self >          Pointer; 
00044   typedef SmartPointer<const Self>      ConstPointer;
00045 
00046   typedef typename Superclass::MeasurementVectorType  MeasurementVectorType;
00047 
00048 
00049   typedef typename Superclass::MeasurementVectorSizeType MeasurementVectorSizeType;
00050 
00052   itkTypeMacro(ManhattanDistanceMetric, DistanceMetric);
00053 
00055   itkNewMacro(Self);
00056 
00058   double Evaluate(const MeasurementVectorType &x) const;
00059 
00061   double Evaluate(const MeasurementVectorType &x1, const MeasurementVectorType &x2) const;
00062 
00063 protected:
00064   ManhattanDistanceMetric() {}
00065   virtual ~ManhattanDistanceMetric() {} 
00066 }; // end of class
00067 
00068 } // end of namespace Statistics 
00069 } // end of namespace itk
00070 
00071 #ifndef ITK_MANUAL_INSTANTIATION
00072 #include "itkManhattanDistanceMetric.txx"
00073 #endif
00074 
00075 #endif
00076 

Generated at Thu May 28 10:42:44 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000