ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkEuclideanDistancePointMetric.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkEuclideanDistancePointMetric_h
19 #define itkEuclideanDistancePointMetric_h
20 
22 #include "itkCovariantVector.h"
23 #include "itkPointSet.h"
24 #include "itkImage.h"
25 
26 namespace itk
27 {
44 template< typename TFixedPointSet, typename TMovingPointSet,
45  typename TDistanceMap =
47 class ITK_TEMPLATE_EXPORT EuclideanDistancePointMetric:
48  public PointSetToPointSetMetric< TFixedPointSet, TMovingPointSet >
49 {
50 public:
51 
55 
58 
60  itkNewMacro(Self);
61 
64 
66  typedef typename Superclass::TransformType TransformType;
67  typedef typename Superclass::TransformPointer TransformPointer;
68  typedef typename Superclass::TransformParametersType TransformParametersType;
69  typedef typename Superclass::TransformJacobianType TransformJacobianType;
70 
71  typedef typename Superclass::MeasureType MeasureType;
72  typedef typename Superclass::DerivativeType DerivativeType;
73  typedef typename Superclass::FixedPointSetType FixedPointSetType;
74  typedef typename Superclass::MovingPointSetType MovingPointSetType;
75  typedef typename Superclass::FixedPointSetConstPointer FixedPointSetConstPointer;
76  typedef typename Superclass::MovingPointSetConstPointer MovingPointSetConstPointer;
77 
78  typedef typename Superclass::FixedPointIterator FixedPointIterator;
79  typedef typename Superclass::FixedPointDataIterator FixedPointDataIterator;
80 
81  typedef typename Superclass::MovingPointIterator MovingPointIterator;
82  typedef typename Superclass::MovingPointDataIterator MovingPointDataIterator;
83 
84  typedef TDistanceMap DistanceMapType;
85  typedef typename DistanceMapType::ConstPointer DistanceMapPointer;
86 
88  unsigned int GetNumberOfValues() const ITK_OVERRIDE;
89 
91  void GetDerivative(const TransformParametersType & parameters,
92  DerivativeType & Derivative) const ITK_OVERRIDE;
93 
95  MeasureType GetValue(const TransformParametersType & parameters) const ITK_OVERRIDE;
96 
98  void GetValueAndDerivative(const TransformParametersType & parameters,
99  MeasureType & Value, DerivativeType & Derivative) const;
100 
102  itkSetConstObjectMacro(DistanceMap, DistanceMapType);
103  itkGetConstObjectMacro(DistanceMap, DistanceMapType);
105 
110  itkSetMacro(ComputeSquaredDistance, bool);
111  itkGetConstMacro(ComputeSquaredDistance, bool);
112  itkBooleanMacro(ComputeSquaredDistance);
114 
115 protected:
117  virtual ~EuclideanDistancePointMetric() ITK_OVERRIDE {}
118 
119  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
120 
121 private:
122  ITK_DISALLOW_COPY_AND_ASSIGN(EuclideanDistancePointMetric);
123 
126 };
127 } // end namespace itk
128 
129 #ifndef ITK_MANUAL_INSTANTIATION
130 #include "itkEuclideanDistancePointMetric.hxx"
131 #endif
132 
133 #endif
Light weight base class for most itk classes.
Superclass::FixedPointIterator FixedPointIterator
Superclass::MovingPointDataIterator MovingPointDataIterator
Computes similarity between two point sets.
Superclass::MovingPointSetType MovingPointSetType
DistanceMapType::ConstPointer DistanceMapPointer
Array2D class representing a 2D array with size defined at construction time.
Definition: itkArray2D.h:45
Computes the minimum distance between a moving point-set and a fixed point-set. A vector of minimum c...
Superclass::FixedPointDataIterator FixedPointDataIterator
Superclass::MovingPointSetConstPointer MovingPointSetConstPointer
PointSetToPointSetMetric< TFixedPointSet, TMovingPointSet > Superclass
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::FixedPointSetConstPointer FixedPointSetConstPointer
Superclass::FixedPointSetType FixedPointSetType
Superclass::MovingPointIterator MovingPointIterator
Base class for most ITK classes.
Definition: itkObject.h:59
Superclass::TransformJacobianType TransformJacobianType
Templated n-dimensional image class.
Definition: itkImage.h:75
Superclass::TransformParametersType TransformParametersType