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

itkEuclideanDistancePointMetric.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkEuclideanDistancePointMetric.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-23 03:53:35 $
00007   Version:   $Revision: 1.5 $
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 __itkEuclideanDistancePointMetric_h
00018 #define __itkEuclideanDistancePointMetric_h
00019 
00020 #include "itkPointSetToPointSetMetric.h"
00021 #include "itkCovariantVector.h"
00022 #include "itkPoint.h"
00023 #include "itkPointSet.h"
00024 #include "itkImage.h"
00025 
00026 namespace itk
00027 {
00043 template < class TFixedPointSet, class TMovingPointSet, 
00044 class TDistanceMap = ::itk::Image<unsigned short,::itk::GetPointSetDimension<TMovingPointSet>::PointDimension> >
00045 class ITK_EXPORT EuclideanDistancePointMetric : 
00046     public PointSetToPointSetMetric< TFixedPointSet, TMovingPointSet>
00047 {
00048 public:
00049 
00051   typedef EuclideanDistancePointMetric                                Self;
00052   typedef PointSetToPointSetMetric<TFixedPointSet, TMovingPointSet >  Superclass;
00053 
00054   typedef SmartPointer<Self>         Pointer;
00055   typedef SmartPointer<const Self>   ConstPointer;
00056 
00058   itkNewMacro(Self);
00059 
00061   itkTypeMacro(EuclideanDistancePointMetric, Object);
00062 
00064   typedef typename Superclass::TransformType              TransformType;
00065   typedef typename Superclass::TransformPointer           TransformPointer;
00066   typedef typename Superclass::TransformParametersType    TransformParametersType;
00067   typedef typename Superclass::TransformJacobianType      TransformJacobianType;
00068 
00069   typedef typename Superclass::MeasureType                MeasureType;
00070   typedef typename Superclass::DerivativeType             DerivativeType;
00071   typedef typename Superclass::FixedPointSetType          FixedPointSetType;
00072   typedef typename Superclass::MovingPointSetType         MovingPointSetType;
00073   typedef typename Superclass::FixedPointSetConstPointer  FixedPointSetConstPointer;
00074   typedef typename Superclass::MovingPointSetConstPointer MovingPointSetConstPointer;
00075 
00076   typedef typename Superclass::PointIterator              PointIterator;
00077   typedef typename Superclass::PointDataIterator          PointDataIterator;
00078 
00079   typedef TDistanceMap                                    DistanceMapType;
00080   typedef typename DistanceMapType::ConstPointer          DistanceMapPointer;
00081 
00082 
00084   unsigned int GetNumberOfValues() const;
00085 
00087   void GetDerivative( const TransformParametersType & parameters,
00088                       DerivativeType & Derivative ) const;
00089 
00091   MeasureType GetValue( const TransformParametersType & parameters ) const;
00092 
00094   void GetValueAndDerivative( const TransformParametersType & parameters,
00095                               MeasureType& Value, DerivativeType& Derivative ) const;
00096 
00098   itkSetConstObjectMacro(DistanceMap,DistanceMapType);
00099   itkGetConstObjectMacro(DistanceMap,DistanceMapType);
00101 
00103   itkSetMacro(ComputeSquaredDistance,bool);
00104   itkGetConstMacro(ComputeSquaredDistance,bool);
00105   itkBooleanMacro(ComputeSquaredDistance);
00107 
00108 protected:
00109   EuclideanDistancePointMetric();
00110   virtual ~EuclideanDistancePointMetric() {};
00111 
00113   void PrintSelf(std::ostream& os, Indent indent) const;
00114 
00115 private:
00116   EuclideanDistancePointMetric(const Self&); //purposely not implemented
00117   void operator=(const Self&); //purposely not implemented
00118 
00119   DistanceMapPointer m_DistanceMap;
00120   bool               m_ComputeSquaredDistance;
00121 
00122 };
00123 
00124 } // end namespace itk
00125 
00126 #ifndef ITK_MANUAL_INSTANTIATION
00127 #include "itkEuclideanDistancePointMetric.txx"
00128 #endif
00129 
00130 #endif
00131 

Generated at Tue Sep 15 02:51:34 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000