ITK  5.2.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  * 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 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);
52 
58 
60  itkSimpleNewMacro(Self);
61 
64 
67  using DerivativeType = typename Superclass::DerivativeType;
68  using LocalDerivativeType = typename Superclass::LocalDerivativeType;
69  using PointType = typename Superclass::PointType;
70  using PixelType = typename Superclass::PixelType;
72  using PointIdentifier = typename Superclass::PointIdentifier;
73  using NeighborsIdentifierType = 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, 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 
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 
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::PointSetToPointSetMetricv4::CoordRepType
typename PointType::CoordRepType CoordRepType
Definition: itkPointSetToPointSetMetricv4.h:143
itk::ExpectationBasedPointSetToPointSetMetricv4::PointType
typename Superclass::PointType PointType
Definition: itkExpectationBasedPointSetToPointSetMetricv4.h:69
itk::ExpectationBasedPointSetToPointSetMetricv4::m_Denominator
MeasureType m_Denominator
Definition: itkExpectationBasedPointSetToPointSetMetricv4.h:140
itk::PointSetToPointSetMetricv4::MeasureType
typename Superclass::MeasureType MeasureType
Definition: itkPointSetToPointSetMetricv4.h:85
itk::ExpectationBasedPointSetToPointSetMetricv4::m_PreFactor
MeasureType m_PreFactor
Definition: itkExpectationBasedPointSetToPointSetMetricv4.h:139
itk::ExpectationBasedPointSetToPointSetMetricv4::LocalDerivativeType
typename Superclass::LocalDerivativeType LocalDerivativeType
Definition: itkExpectationBasedPointSetToPointSetMetricv4.h:68
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::ExpectationBasedPointSetToPointSetMetricv4::PointIdentifier
typename Superclass::PointIdentifier PointIdentifier
Definition: itkExpectationBasedPointSetToPointSetMetricv4.h:72
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::ExpectationBasedPointSetToPointSetMetricv4::NeighborsIdentifierType
typename Superclass::NeighborsIdentifierType NeighborsIdentifierType
Definition: itkExpectationBasedPointSetToPointSetMetricv4.h:73
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::ExpectationBasedPointSetToPointSetMetricv4::PixelType
typename Superclass::PixelType PixelType
Definition: itkExpectationBasedPointSetToPointSetMetricv4.h:70
itk::ExpectationBasedPointSetToPointSetMetricv4::NeighborsIterator
typename NeighborsIdentifierType::const_iterator NeighborsIterator
Definition: itkExpectationBasedPointSetToPointSetMetricv4.h:136
itkPointSetToPointSetMetricv4.h
itk::ExpectationBasedPointSetToPointSetMetricv4::m_PointSetSigma
CoordRepType m_PointSetSigma
Definition: itkExpectationBasedPointSetToPointSetMetricv4.h:138
itk::ObjectToObjectMetricBaseTemplate::MeasureType
typename Superclass::MeasureType MeasureType
Definition: itkObjectToObjectMetricBase.h:109
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ExpectationBasedPointSetToPointSetMetricv4::CoordRepType
typename Superclass::CoordRepType CoordRepType
Definition: itkExpectationBasedPointSetToPointSetMetricv4.h:71
itkPointSet.h
itk::ObjectToObjectMetricBaseTemplate::DerivativeType
typename Superclass::DerivativeType DerivativeType
Definition: itkObjectToObjectMetricBase.h:112
itk::PointSetToPointSetMetricv4
Computes similarity between two point sets.
Definition: itkPointSetToPointSetMetricv4.h:68