18 #ifndef itkPointSetToPointSetMetricv4_h
19 #define itkPointSetToPointSetMetricv4_h
69 template <
typename TFixedPo
intSet,
typename TMovingPo
intSet,
class TInternalComputationValueType =
double>
72 TMovingPointSet::PointDimension,
73 Image<TInternalComputationValueType, TFixedPointSet::PointDimension>,
74 TInternalComputationValueType>
82 TMovingPointSet::PointDimension,
84 TInternalComputationValueType>;
132 static constexpr
DimensionType FixedPointDimension = Superclass::FixedDimension;
140 static constexpr
DimensionType MovingPointDimension = Superclass::MovingDimension;
186 auto * pointSet = dynamic_cast<FixedPointSetType *>(const_cast<ObjectType *>(
object));
187 if (pointSet !=
nullptr)
189 this->SetFixedPointSet(pointSet);
193 itkExceptionMacro(
"Incorrect object type. Should be a point set.")
202 auto * pointSet = dynamic_cast<MovingPointSetType *>(const_cast<ObjectType *>(
object));
203 if (pointSet !=
nullptr)
205 this->SetMovingPointSet(pointSet);
209 itkExceptionMacro(
"Incorrect object type. Should be a point set.")
215 itkSetConstObjectMacro(FixedPointSet, FixedPointSetType);
216 itkGetConstObjectMacro(FixedPointSet, FixedPointSetType);
220 itkGetModifiableObjectMacro(FixedTransformedPointSet, FixedTransformedPointSetType);
223 itkSetConstObjectMacro(MovingPointSet, MovingPointSetType);
224 itkGetConstObjectMacro(MovingPointSet, MovingPointSetType);
228 itkGetModifiableObjectMacro(MovingTransformedPointSet, MovingTransformedPointSetType);
234 GetNumberOfComponents()
const;
247 GetValue()
const override;
260 GetDerivative(DerivativeType &)
const override;
273 GetValueAndDerivative(MeasureType &, DerivativeType &)
const override;
281 GetLocalNeighborhoodValue(
const PointType &,
const PixelType & pixel)
const = 0;
287 virtual LocalDerivativeType
288 GetLocalNeighborhoodDerivative(
const PointType &,
const PixelType & pixel)
const;
295 GetLocalNeighborhoodValueAndDerivative(
const PointType &,
297 LocalDerivativeType &,
298 const PixelType & pixel)
const = 0;
304 const VirtualPointSetType *
305 GetVirtualTransformedPointSet()
const;
312 Initialize()
override;
333 itkSetMacro(StoreDerivativeAsSparseFieldForLocalSupportTransforms,
bool);
334 itkGetConstMacro(StoreDerivativeAsSparseFieldForLocalSupportTransforms,
bool);
335 itkBooleanMacro(StoreDerivativeAsSparseFieldForLocalSupportTransforms);
341 itkSetMacro(CalculateValueAndDerivativeInTangentSpace,
bool);
342 itkGetConstMacro(CalculateValueAndDerivativeInTangentSpace,
bool);
343 itkBooleanMacro(CalculateValueAndDerivativeInTangentSpace);
350 PrintSelf(std::ostream & os,
Indent indent)
const override;
383 InitializePointSets()
const;
390 InitializeForIteration()
const;
398 CalculateNumberOfValidFixedPoints()
const;
412 TransformFixedAndCreateVirtualPointSet()
const;
421 TransformMovingPointSet()
const;
428 InitializePointsLocators()
const;
443 return MetricCategoryType::POINT_SET_METRIC;
459 mutable bool m_MovingTransformPointLocatorsNeedInitialization;
477 CreateRanges()
const;
481 #ifndef ITK_MANUAL_INSTANTIATION
482 # include "itkPointSetToPointSetMetricv4.hxx"