18 #ifndef itkPointSetToPointSetMetricWithIndexv4_h
19 #define itkPointSetToPointSetMetricWithIndexv4_h
69 template <
typename TFixedPointSet,
70 typename TMovingPointSet = TFixedPointSet,
71 class TInternalComputationValueType =
double>
74 TMovingPointSet::PointDimension,
75 Image<TInternalComputationValueType, TFixedPointSet::PointDimension>,
76 TInternalComputationValueType>
84 TMovingPointSet::PointDimension,
86 TInternalComputationValueType>;
134 static constexpr
DimensionType FixedPointDimension = Superclass::FixedDimension;
142 static constexpr
DimensionType MovingPointDimension = Superclass::MovingDimension;
188 auto * pointSet = dynamic_cast<FixedPointSetType *>(const_cast<ObjectType *>(
object));
189 if (pointSet !=
nullptr)
191 this->SetFixedPointSet(pointSet);
195 itkExceptionMacro(
"Incorrect object type. Should be a point set.");
204 auto * pointSet = dynamic_cast<MovingPointSetType *>(const_cast<ObjectType *>(
object));
205 if (pointSet !=
nullptr)
207 this->SetMovingPointSet(pointSet);
211 itkExceptionMacro(
"Incorrect object type. Should be a point set.");
217 itkSetConstObjectMacro(FixedPointSet, FixedPointSetType);
218 itkGetConstObjectMacro(FixedPointSet, FixedPointSetType);
222 itkGetModifiableObjectMacro(FixedTransformedPointSet, FixedTransformedPointSetType);
225 itkSetConstObjectMacro(MovingPointSet, MovingPointSetType);
226 itkGetConstObjectMacro(MovingPointSet, MovingPointSetType);
230 itkGetModifiableObjectMacro(MovingTransformedPointSet, MovingTransformedPointSetType);
236 GetNumberOfComponents()
const;
249 GetValue()
const override;
262 GetDerivative(DerivativeType &)
const override;
275 GetValueAndDerivative(MeasureType &, DerivativeType &)
const override;
281 const VirtualPointSetType *
282 GetVirtualTransformedPointSet()
const;
289 Initialize()
override;
310 itkSetMacro(StoreDerivativeAsSparseFieldForLocalSupportTransforms,
bool);
311 itkGetConstMacro(StoreDerivativeAsSparseFieldForLocalSupportTransforms,
bool);
312 itkBooleanMacro(StoreDerivativeAsSparseFieldForLocalSupportTransforms);
318 itkSetMacro(CalculateValueAndDerivativeInTangentSpace,
bool);
319 itkGetConstMacro(CalculateValueAndDerivativeInTangentSpace,
bool);
320 itkBooleanMacro(CalculateValueAndDerivativeInTangentSpace);
327 PrintSelf(std::ostream & os,
Indent indent)
const override;
360 InitializePointSets()
const;
367 InitializeForIteration()
const;
375 CalculateNumberOfValidFixedPoints()
const;
389 TransformFixedAndCreateVirtualPointSet()
const;
398 TransformMovingPointSet()
const;
405 InitializePointsLocators()
const;
420 return MetricCategoryType::POINT_SET_METRIC;
441 GetLocalNeighborhoodValueWithIndex(
const PointIdentifier &,
const PointType &,
const PixelType & pixel)
const = 0;
449 virtual LocalDerivativeType
450 GetLocalNeighborhoodDerivativeWithIndex(
const PointIdentifier &,
const PointType &,
const PixelType & pixel)
const;
458 GetLocalNeighborhoodValueAndDerivativeWithIndex(
const PointIdentifier &,
461 LocalDerivativeType &,
462 const PixelType & pixel)
const = 0;
483 CreateRanges()
const;
487 #ifndef ITK_MANUAL_INSTANTIATION
488 # include "itkPointSetToPointSetMetricWithIndexv4.hxx"