ITK  6.0.0
Insight Toolkit
itkExpectationBasedPointSetToPointSetMetricv4.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 itkExpectationBasedPointSetToPointSetMetricv4_h
19#define itkExpectationBasedPointSetToPointSetMetricv4_h
20
22#include "itkPointSet.h"
23#include "itkImage.h"
24
25namespace itk
26{
43template <typename TFixedPointSet,
44 typename TMovingPointSet = TFixedPointSet,
45 class TInternalComputationValueType = double>
47 : public PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
48{
49public:
50 ITK_DISALLOW_COPY_AND_MOVE(ExpectationBasedPointSetToPointSetMetricv4);
58
60 itkSimpleNewMacro(Self);
61
63 itkOverrideGetNameOfClassMacro(ExpectationBasedPointSetToPointSetMetricv4);
64
66 using typename Superclass::MeasureType;
67 using typename Superclass::DerivativeType;
68 using typename Superclass::LocalDerivativeType;
69 using typename Superclass::PointType;
70 using typename Superclass::PixelType;
71 using typename Superclass::CoordRepType;
72 using typename Superclass::PointIdentifier;
73 using typename Superclass::NeighborsIdentifierType;
74
79 GetLocalNeighborhoodValue(const PointType &, const PixelType & pixel = 0) const override;
80
84 void
88 const PixelType & pixel = 0) const override;
89
95 itkSetMacro(PointSetSigma, CoordRepType);
96
98 itkGetConstMacro(PointSetSigma, CoordRepType);
99
104 itkSetMacro(EvaluationKNeighborhood, unsigned int);
105
110 itkGetConstMacro(EvaluationKNeighborhood, unsigned int);
111
112 void
113 Initialize() override;
114
117 typename LightObject::Pointer
118 InternalClone() const override;
119
120protected:
123
124 bool
126 {
127 return false;
128 }
129
131 void
132 PrintSelf(std::ostream & os, Indent indent) const override;
133
134private:
136 using NeighborsIterator = typename NeighborsIdentifierType::const_iterator;
137
138 CoordRepType m_PointSetSigma{};
139 MeasureType m_PreFactor{};
140 MeasureType m_Denominator{};
141 unsigned int m_EvaluationKNeighborhood{ 50 };
142};
143} // end namespace itk
144
145#ifndef ITK_MANUAL_INSTANTIATION
146# include "itkExpectationBasedPointSetToPointSetMetricv4.hxx"
147#endif
148
149#endif
Computes an expectation-based metric between two point sets.
MeasureType GetLocalNeighborhoodValue(const PointType &, const PixelType &pixel=0) const override
LightObject::Pointer InternalClone() const override
void PrintSelf(std::ostream &os, Indent indent) const override
typename NeighborsIdentifierType::const_iterator NeighborsIterator
~ExpectationBasedPointSetToPointSetMetricv4() override=default
void GetLocalNeighborhoodValueAndDerivative(const PointType &, MeasureType &, LocalDerivativeType &, const PixelType &pixel=0) const override
Simulate a standard C array with copy semantics.
Definition: itkFixedArray.h:54
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Computes similarity between two point sets.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....