18#ifndef itkPointSetToPointSetMetricWithIndexv4_h
19#define itkPointSetToPointSetMetricWithIndexv4_h
69template <
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>;
94 using typename Superclass::MeasureType;
97 using typename Superclass::ParametersType;
98 using typename Superclass::ParametersValueType;
99 using typename Superclass::NumberOfParametersType;
102 using typename Superclass::DerivativeType;
105 using typename Superclass::FixedTransformType;
106 using typename Superclass::FixedTransformPointer;
107 using typename Superclass::FixedInputPointType;
108 using typename Superclass::FixedOutputPointType;
109 using typename Superclass::FixedTransformParametersType;
111 using typename Superclass::MovingTransformType;
112 using typename Superclass::MovingTransformPointer;
113 using typename Superclass::MovingInputPointType;
114 using typename Superclass::MovingOutputPointType;
115 using typename Superclass::MovingTransformParametersType;
117 using typename Superclass::JacobianType;
118 using typename Superclass::FixedTransformJacobianType;
119 using typename Superclass::MovingTransformJacobianType;
126 using typename Superclass::DimensionType;
134 static constexpr DimensionType FixedPointDimension = Superclass::FixedDimension;
142 static constexpr DimensionType MovingPointDimension = Superclass::MovingDimension;
171 using typename Superclass::VirtualImagePointer;
172 using typename Superclass::VirtualPixelType;
173 using typename Superclass::VirtualRegionType;
174 using typename Superclass::VirtualSizeType;
175 using typename Superclass::VirtualSpacingType;
177 using typename Superclass::VirtualPointType;
178 using typename Superclass::VirtualDirectionType;
180 using typename Superclass::VirtualIndexType;
181 using typename Superclass::VirtualPointSetType;
182 using typename Superclass::VirtualPointSetPointer;
189 if (pointSet !=
nullptr)
191 this->SetFixedPointSet(pointSet);
195 itkExceptionMacro(
"Incorrect object type. Should be a point set.");
205 if (pointSet !=
nullptr)
207 this->SetMovingPointSet(pointSet);
211 itkExceptionMacro(
"Incorrect object type. Should be a point set.");
310 itkSetMacro(StoreDerivativeAsSparseFieldForLocalSupportTransforms,
bool);
311 itkGetConstMacro(StoreDerivativeAsSparseFieldForLocalSupportTransforms,
bool);
312 itkBooleanMacro(StoreDerivativeAsSparseFieldForLocalSupportTransforms);
318 itkSetMacro(CalculateValueAndDerivativeInTangentSpace,
bool);
319 itkGetConstMacro(CalculateValueAndDerivativeInTangentSpace,
bool);
320 itkBooleanMacro(CalculateValueAndDerivativeInTangentSpace);
346 bool m_UsePointSetData{};
355 bool m_CalculateValueAndDerivativeInTangentSpace{};
414 using typename Superclass::MetricCategoryType;
420 return MetricCategoryType::POINT_SET_METRIC;
465 mutable bool m_MovingTransformPointLocatorsNeedInitialization{};
466 mutable bool m_FixedTransformPointLocatorsNeedInitialization{};
470 mutable bool m_HaveWarnedAboutNumberOfValidPoints{};
474 bool m_StoreDerivativeAsSparseFieldForLocalSupportTransforms{};
487#ifndef ITK_MANUAL_INSTANTIATION
488# include "itkPointSetToPointSetMetricWithIndexv4.hxx"
Simulate a standard C array with copy semantics.
Templated n-dimensional image class.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
Computes similarity between regions of two objects.
SizeValueType DimensionType
typename VirtualPointSetType::Pointer VirtualPointSetPointer
typename VirtualImageType::PointType VirtualPointType
typename Superclass::MetricCategoryEnum MetricCategoryType
Computes similarity between two point sets.
const PointIdentifierRanges CreateRanges() const
typename PointsContainer::ElementIdentifier PointIdentifier
virtual void InitializeForIteration() const
virtual SizeValueType CalculateNumberOfValidFixedPoints() const
void TransformFixedAndCreateVirtualPointSet() const
void GetDerivative(DerivativeType &) const override
~PointSetToPointSetMetricWithIndexv4() override=default
virtual bool RequiresMovingPointsLocator() const
const VirtualPointSetType * GetVirtualTransformedPointSet() const
typename TFixedPointSet::PixelType FixedPixelType
typename Superclass::VirtualSizeType VirtualRadiusType
typename Superclass::ObjectType ObjectType
typename TMovingPointSet::PointsContainer MovingPointsContainer
typename TFixedPointSet::PointType FixedPointType
TMovingPointSet MovingPointSetType
std::vector< PointIdentifierPair > PointIdentifierRanges
virtual void GetLocalNeighborhoodValueAndDerivativeWithIndex(const PointIdentifier &, const PointType &, MeasureType &, LocalDerivativeType &, const PixelType &pixel) const =0
void CalculateValueAndDerivative(MeasureType &calculatedValue, DerivativeType &derivative, bool calculateValue) const
virtual LocalDerivativeType GetLocalNeighborhoodDerivativeWithIndex(const PointIdentifier &, const PointType &, const PixelType &pixel) const
typename Superclass::VirtualImageType VirtualImageType
virtual bool RequiresFixedPointsLocator() const
typename TMovingPointSet::PixelType MovingPixelType
FixedPointsContainer PointsContainer
typename PointType::CoordRepType CoordRepType
MeasureType GetValue() const override
typename TMovingPointSet::PointType MovingPointType
void Initialize() override
SizeValueType GetNumberOfComponents() const
TFixedPointSet FixedPointSetType
void TransformMovingPointSet() const
void StorePointDerivative(const VirtualPointType &, const DerivativeType &, DerivativeType &) const
typename Superclass::MovingDisplacementFieldTransformType DisplacementFieldTransformType
PointSetToPointSetMetricWithIndexv4()
std::pair< PointIdentifier, PointIdentifier > PointIdentifierPair
bool SupportsArbitraryVirtualDomainSamples() const override
void GetValueAndDerivative(MeasureType &, DerivativeType &) const override
virtual MeasureType GetLocalNeighborhoodValueWithIndex(const PointIdentifier &, const PointType &, const PixelType &pixel) const =0
void PrintSelf(std::ostream &os, Indent indent) const override
void InitializePointsLocators() const
typename DerivativeType::ValueType DerivativeValueType
void SetFixedObject(const ObjectType *object) override
typename PointsContainer::ConstIterator PointsConstIterator
typename TFixedPointSet::PointsContainer FixedPointsContainer
void SetMovingObject(const ObjectType *object) override
MetricCategoryType GetMetricCategory() const override
typename PointsLocatorType::NeighborsIdentifierType NeighborsIdentifierType
virtual void InitializePointSets() const
typename Superclass::VirtualPointType VirtualOriginType
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
Accelerate geometric searches for points.
typename TreeType::InstanceIdentifierVectorType NeighborsIdentifierType
SmartPointer< const Self > ConstPointer
ImageBaseType::PointType PointType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
SizeValueType ModifiedTimeType
unsigned long SizeValueType