ITK  5.4.0
Insight Toolkit
itkEuclideanDistancePointSetToPointSetMetricv4.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 itkEuclideanDistancePointSetToPointSetMetricv4_h
19 #define itkEuclideanDistancePointSetToPointSetMetricv4_h
20 
22 
23 namespace itk
24 {
41 template <typename TFixedPointSet,
42  typename TMovingPointSet = TFixedPointSet,
43  class TInternalComputationValueType = double>
45  : public PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
46 {
47 public:
48  ITK_DISALLOW_COPY_AND_MOVE(EuclideanDistancePointSetToPointSetMetricv4);
49 
55 
57  itkNewMacro(Self);
58 
60  itkOverrideGetNameOfClassMacro(EuclideanDistancePointSetToPointSetMetricv4);
61 
63  using typename Superclass::MeasureType;
64  using typename Superclass::DerivativeType;
65  using typename Superclass::LocalDerivativeType;
66  using typename Superclass::PointType;
67  using typename Superclass::PixelType;
68  using typename Superclass::PointIdentifier;
69 
70  using RealType = MeasureType;
76  itkSetMacro(DistanceThreshold, RealType);
77 
82  itkGetConstMacro(DistanceThreshold, RealType);
83 
87  MeasureType
88  GetLocalNeighborhoodValue(const PointType &, const PixelType & pixel = 0) const override;
89 
93  void
94  GetLocalNeighborhoodValueAndDerivative(const PointType &,
95  MeasureType &,
97  const PixelType & pixel = 0) const override;
98 
99 protected:
101  ~EuclideanDistancePointSetToPointSetMetricv4() override = default;
102 
103  bool
104  RequiresFixedPointsLocator() const override
105  {
106  return false;
107  }
108 
110  void
111  PrintSelf(std::ostream & os, Indent indent) const override;
112 
113 private:
114  RealType m_DistanceThreshold = -1.0;
115 };
116 } // end namespace itk
117 
118 #ifndef ITK_MANUAL_INSTANTIATION
119 # include "itkEuclideanDistancePointSetToPointSetMetricv4.hxx"
120 #endif
121 
122 #endif
itk::PointSetToPointSetMetricWithIndexv4::PixelType
FixedPixelType PixelType
Definition: itkPointSetToPointSetMetricWithIndexv4.h:153
itk::EuclideanDistancePointSetToPointSetMetricv4::RequiresFixedPointsLocator
bool RequiresFixedPointsLocator() const override
Definition: itkEuclideanDistancePointSetToPointSetMetricv4.h:104
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::EuclideanDistancePointSetToPointSetMetricv4
Computes the Euclidan distance metric between two point sets.
Definition: itkEuclideanDistancePointSetToPointSetMetricv4.h:44
itk::EuclideanDistancePointSetToPointSetMetricv4::RealType
MeasureType RealType
Definition: itkEuclideanDistancePointSetToPointSetMetricv4.h:70
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: itkAnnulusOperator.h:24
itk::PointSetToPointSetMetricWithIndexv4::PointType
FixedPointType PointType
Definition: itkPointSetToPointSetMetricWithIndexv4.h:152
itk::PointSetToPointSetMetricv4
Computes similarity between two point sets.
Definition: itkPointSetToPointSetMetricv4.h:68