Loading [MathJax]/jax/input/TeX/config.js
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 
25 namespace itk
26 {
43 template <typename TFixedPointSet,
44  typename TMovingPointSet = TFixedPointSet,
45  class TInternalComputationValueType = double>
47  : public PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
48 {
49 public:
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::CoordinateType;
72  using typename Superclass::PointIdentifier;
73  using typename Superclass::NeighborsIdentifierType;
74 
79  GetLocalNeighborhoodValue(const PointType &, const PixelType & pixel = 0) const override;
80 
84  void
85  GetLocalNeighborhoodValueAndDerivative(const PointType &,
86  MeasureType &,
88  const PixelType & pixel = 0) const override;
89 
95  itkSetMacro(PointSetSigma, CoordinateType);
96 
98  itkGetConstMacro(PointSetSigma, CoordinateType);
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 
120 protected:
122  ~ExpectationBasedPointSetToPointSetMetricv4() override = default;
123 
124  bool
125  RequiresFixedPointsLocator() const override
126  {
127  return false;
128  }
129 
131  void
132  PrintSelf(std::ostream & os, Indent indent) const override;
133 
134 private:
136  using NeighborsIterator = typename NeighborsIdentifierType::const_iterator;
137 
138  CoordinateType 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
itk::ExpectationBasedPointSetToPointSetMetricv4::RequiresFixedPointsLocator
bool RequiresFixedPointsLocator() const override
Definition: itkExpectationBasedPointSetToPointSetMetricv4.h:125
itk::PointSetToPointSetMetricWithIndexv4::PixelType
FixedPixelType PixelType
Definition: itkPointSetToPointSetMetricWithIndexv4.h:153
itk::GTest::TypedefsAndConstructors::Dimension2::VectorType
ImageBaseType::SpacingType VectorType
Definition: itkGTestTypedefsAndConstructors.h:53
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itkImage.h
itk::ExpectationBasedPointSetToPointSetMetricv4::VectorType
typename PointType::VectorType VectorType
Definition: itkExpectationBasedPointSetToPointSetMetricv4.h:135
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ExpectationBasedPointSetToPointSetMetricv4
Computes an expectation-based metric between two point sets.
Definition: itkExpectationBasedPointSetToPointSetMetricv4.h:46
itk::SingleValuedCostFunctionv4Template::MeasureType
TInternalComputationValueType MeasureType
Definition: itkSingleValuedCostFunctionv4.h:67
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::ExpectationBasedPointSetToPointSetMetricv4::NeighborsIterator
typename NeighborsIdentifierType::const_iterator NeighborsIterator
Definition: itkExpectationBasedPointSetToPointSetMetricv4.h:136
itk::PointSetToPointSetMetricv4::CoordinateType
typename PointType::CoordinateType CoordinateType
Definition: itkPointSetToPointSetMetricv4.h:143
itkPointSetToPointSetMetricv4.h
itk::FixedArray
Simulate a standard C array with copy semantics.
Definition: itkFixedArray.h:53
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itkPointSet.h
itk::PointSetToPointSetMetricWithIndexv4::PointType
FixedPointType PointType
Definition: itkPointSetToPointSetMetricWithIndexv4.h:152
itk::PointSetToPointSetMetricv4
Computes similarity between two point sets.
Definition: itkPointSetToPointSetMetricv4.h:68