NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkKnownCorEuclideanDistancePointMetric.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef itkKnownCorEuclideanDistancePointMetric_h
16 #define itkKnownCorEuclideanDistancePointMetric_h
17 
18 #include <itkPointSetToPointSetMetric.h>
19 #include <itkCovariantVector.h>
20 #include <itkPoint.h>
21 #include <itkPointSet.h>
22 #include <itkImage.h>
23 
24 namespace itk
25 {
36 template < class TFixedPointSet, class TMovingPointSet >
38  public PointSetToPointSetMetric< TFixedPointSet, TMovingPointSet>
39 {
40 public:
41 
44  typedef PointSetToPointSetMetric<TFixedPointSet, TMovingPointSet > Superclass;
45 
46  typedef SmartPointer<Self> Pointer;
47  typedef SmartPointer<const Self> ConstPointer;
48 
50  itkNewMacro(Self);
51 
53  itkTypeMacro(EuclideanDistancePointMetric, Object);
54 
57  typedef typename Superclass::TransformPointer TransformPointer;
58  typedef typename Superclass::TransformParametersType TransformParametersType;
59  typedef typename Superclass::TransformJacobianType TransformJacobianType;
60 
61  typedef typename Superclass::MeasureType MeasureType;
62  typedef typename Superclass::DerivativeType DerivativeType;
63  typedef typename Superclass::FixedPointSetType FixedPointSetType;
64  typedef typename Superclass::MovingPointSetType MovingPointSetType;
65  typedef typename Superclass::FixedPointSetConstPointer FixedPointSetConstPointer;
66  typedef typename Superclass::MovingPointSetConstPointer MovingPointSetConstPointer;
67 
68  typedef typename Superclass::PointIterator PointIterator;
69  typedef typename Superclass::PointDataIterator PointDataIterator;
70 
71 
73  unsigned int GetNumberOfValues() const;
74 
76  void GetDerivative( const TransformParametersType & parameters,
77  DerivativeType & Derivative ) const;
78 
80  MeasureType GetValue( const TransformParametersType & parameters ) const;
81 
83  void GetValueAndDerivative( const TransformParametersType & parameters,
84  MeasureType& Value, DerivativeType& Derivative ) const;
85 
87  itkSetMacro(ComputeSquaredDistance,bool);
88  itkGetConstMacro(ComputeSquaredDistance,bool);
89  itkBooleanMacro(ComputeSquaredDistance);
90 
91 protected:
94 
96  void PrintSelf(std::ostream& os, Indent indent) const;
97 
98 private:
99  KnownCorEuclideanDistancePointMetric(const Self&); //purposely not implemented
100  void operator=(const Self&); //purposely not implemented
101 
102  bool m_ComputeSquaredDistance;
103 
104 };
105 
106 } // end namespace itk
107 
108 #ifndef ITK_MANUAL_INSTANTIATION
109 #include "itkKnownCorEuclideanDistancePointMetric.txx"
110 #endif
111 
112 #endif
Superclass::TransformParametersType TransformParametersType
Definition: itkKnownCorEuclideanDistancePointMetric.h:58
Definition: niftkITKAffineResampleImage.cxx:74
Superclass::TransformType TransformType
Definition: itkKnownCorEuclideanDistancePointMetric.h:53
itk::EulerAffineTransform< double, 2, 2 > TransformType
Definition: EulerAffine2DJacobianTest.cxx:27
KnownCorEuclideanDistancePointMetric Self
Definition: itkKnownCorEuclideanDistancePointMetric.h:43
Superclass::MeasureType MeasureType
Definition: itkKnownCorEuclideanDistancePointMetric.h:61
Definition: itkKnownCorEuclideanDistancePointMetric.h:37
Computes the distance between a moving point-set and a fixed point-set. Correspondance is assumed bet...
Superclass::MovingPointSetConstPointer MovingPointSetConstPointer
Definition: itkKnownCorEuclideanDistancePointMetric.h:66
Superclass::FixedPointSetType FixedPointSetType
Definition: itkKnownCorEuclideanDistancePointMetric.h:63
virtual ~KnownCorEuclideanDistancePointMetric()
Definition: itkKnownCorEuclideanDistancePointMetric.h:93
Superclass::FixedPointSetConstPointer FixedPointSetConstPointer
Definition: itkKnownCorEuclideanDistancePointMetric.h:65
PointSetToPointSetMetric< TFixedPointSet, TMovingPointSet > Superclass
Definition: itkKnownCorEuclideanDistancePointMetric.h:44
Superclass::PointIterator PointIterator
Definition: itkKnownCorEuclideanDistancePointMetric.h:68
SmartPointer< const Self > ConstPointer
Definition: itkKnownCorEuclideanDistancePointMetric.h:47
Superclass::TransformJacobianType TransformJacobianType
Definition: itkKnownCorEuclideanDistancePointMetric.h:59
Superclass::PointDataIterator PointDataIterator
Definition: itkKnownCorEuclideanDistancePointMetric.h:69
Superclass::DerivativeType DerivativeType
Definition: itkKnownCorEuclideanDistancePointMetric.h:62
Superclass::MovingPointSetType MovingPointSetType
Definition: itkKnownCorEuclideanDistancePointMetric.h:64
Superclass::TransformPointer TransformPointer
Definition: itkKnownCorEuclideanDistancePointMetric.h:57
SmartPointer< Self > Pointer
Definition: itkKnownCorEuclideanDistancePointMetric.h:46