ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkEuclideanDistancePointMetric.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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
26namespace itk
27{
43template <typename TFixedPointSet,
44 typename TMovingPointSet,
45 typename TDistanceMap = itk::Image<unsigned short, TMovingPointSet::PointDimension>>
46class ITK_TEMPLATE_EXPORT EuclideanDistancePointMetric
47 : public PointSetToPointSetMetric<TFixedPointSet, TMovingPointSet>
48{
49public:
50 ITK_DISALLOW_COPY_AND_MOVE(EuclideanDistancePointMetric);
51
55
58
60 itkNewMacro(Self);
61
63 itkOverrideGetNameOfClassMacro(EuclideanDistancePointMetric);
64
66 using typename Superclass::TransformType;
67 using typename Superclass::TransformPointer;
70
71 using typename Superclass::MeasureType;
72 using typename Superclass::DerivativeType;
73 using typename Superclass::FixedPointSetType;
74 using typename Superclass::MovingPointSetType;
77
78 using typename Superclass::FixedPointIterator;
80
83
84 using DistanceMapType = TDistanceMap;
85 using DistanceMapPointer = typename DistanceMapType::ConstPointer;
86
88 unsigned int
89 GetNumberOfValues() const override;
90
92 void
93 GetDerivative(const TransformParametersType & itkNotUsed(parameters),
94 DerivativeType & itkNotUsed(derivative)) const override
95 {}
96
98 MeasureType
99 GetValue(const TransformParametersType & parameters) const override;
100
102 void
104 MeasureType & value,
105 DerivativeType & derivative) const;
106
108 itkSetConstObjectMacro(DistanceMap, DistanceMapType);
109 itkGetConstObjectMacro(DistanceMap, DistanceMapType);
111
116 itkSetMacro(ComputeSquaredDistance, bool);
117 itkGetConstMacro(ComputeSquaredDistance, bool);
118 itkBooleanMacro(ComputeSquaredDistance);
120
121protected:
123 ~EuclideanDistancePointMetric() override = default;
124
125 void
126 PrintSelf(std::ostream & os, Indent indent) const override;
127
128private:
131};
132} // end namespace itk
133
134#ifndef ITK_MANUAL_INSTANTIATION
135# include "itkEuclideanDistancePointMetric.hxx"
136#endif
137
138#endif
void GetDerivative(const TransformParametersType &parameters, DerivativeType &derivative) const override
void GetValueAndDerivative(const TransformParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
PointSetToPointSetMetric< TFixedPointSet, TMovingPointSet > Superclass
MeasureType GetValue(const TransformParametersType &parameters) const override
typename DistanceMapType::ConstPointer DistanceMapPointer
~EuclideanDistancePointMetric() override=default
unsigned int GetNumberOfValues() const override
void PrintSelf(std::ostream &os, Indent indent) const override
typename TransformType::ParametersType TransformParametersType
Control indentation during Print() invocation.
Definition itkIndent.h:50
typename MovingPointSetType::ConstPointer MovingPointSetConstPointer
typename MovingPointSetType::PointDataContainer::ConstIterator MovingPointDataIterator
typename FixedPointSetType::PointsContainer::ConstIterator FixedPointIterator
typename FixedPointSetType::ConstPointer FixedPointSetConstPointer
typename TransformType::Pointer TransformPointer
typename TransformType::JacobianType TransformJacobianType
typename MovingPointSetType::PointsContainer::ConstIterator MovingPointIterator
typename FixedPointSetType::PointDataContainer::ConstIterator FixedPointDataIterator
Superclass::DerivativeType DerivativeType
Transform< CoordinateRepresentationType, Self::MovingPointSetDimension, Self::FixedPointSetDimension > TransformType
typename TransformType::ParametersType TransformParametersType
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....