00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkIterativeClosestPointMetric_h
00018
#define __itkIterativeClosestPointMetric_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 IterativeClosestPointMetric :
00046
public PointSetToPointSetMetric< TFixedPointSet, TMovingPointSet>
00047 {
00048
public:
00049
00051 typedef IterativeClosestPointMetric
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(IterativeClosestPointMetric,
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::Pointer
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
00097 itkSetObjectMacro(DistanceMap,
DistanceMapType);
00098 itkGetConstObjectMacro(DistanceMap,DistanceMapType);
00099
00100 protected:
00101 IterativeClosestPointMetric();
00102 virtual ~IterativeClosestPointMetric() {};
00103
00105
void PrintSelf(std::ostream& os,
Indent indent)
const;
00106
00107
private:
00108 IterativeClosestPointMetric(
const Self&);
00109
void operator=(
const Self&);
00110
00111 DistanceMapPointer m_DistanceMap;
00112
00113 };
00114
00115 }
00116
00117
#ifndef ITK_MANUAL_INSTANTIATION
00118
#include "itkIterativeClosestPointMetric.txx"
00119
#endif
00120
00121
#endif