18 #ifndef itkPointSetToPointSetMetricv4_h
19 #define itkPointSetToPointSetMetricv4_h
69 template<
typename TFixedPointSet,
typename TMovingPointSet,
70 class TInternalComputationValueType =
double>
73 Image<TInternalComputationValueType, TFixedPointSet::PointDimension>, TInternalComputationValueType>
81 TMovingPointSet::PointDimension,
83 TInternalComputationValueType>;
131 static constexpr
DimensionType FixedPointDimension = Superclass::FixedDimension;
139 static constexpr
DimensionType MovingPointDimension = Superclass::MovingDimension;
185 if( pointSet !=
nullptr )
187 this->SetFixedPointSet( pointSet );
191 itkExceptionMacro(
"Incorrect object type. Should be a point set." )
200 if( pointSet !=
nullptr )
202 this->SetMovingPointSet( pointSet );
206 itkExceptionMacro(
"Incorrect object type. Should be a point set." )
212 itkSetConstObjectMacro( FixedPointSet, FixedPointSetType );
213 itkGetConstObjectMacro( FixedPointSet, FixedPointSetType );
217 itkGetModifiableObjectMacro( FixedTransformedPointSet, FixedTransformedPointSetType );
220 itkSetConstObjectMacro( MovingPointSet, MovingPointSetType );
221 itkGetConstObjectMacro( MovingPointSet, MovingPointSetType );
225 itkGetModifiableObjectMacro( MovingTransformedPointSet, MovingTransformedPointSetType );
242 MeasureType GetValue()
const override;
254 void GetDerivative( DerivativeType & )
const override;
266 void GetValueAndDerivative( MeasureType &, DerivativeType & )
const override;
273 virtual MeasureType GetLocalNeighborhoodValue(
const PointType &,
const PixelType & pixel )
const = 0;
279 virtual LocalDerivativeType GetLocalNeighborhoodDerivative(
const PointType &,
const PixelType & pixel )
const;
285 virtual void GetLocalNeighborhoodValueAndDerivative(
const PointType &,
286 MeasureType &, LocalDerivativeType &,
const PixelType & pixel )
const = 0;
292 const VirtualPointSetType * GetVirtualTransformedPointSet()
const;
298 void Initialize()
override;
318 itkSetMacro( StoreDerivativeAsSparseFieldForLocalSupportTransforms,
bool );
319 itkGetConstMacro( StoreDerivativeAsSparseFieldForLocalSupportTransforms,
bool );
320 itkBooleanMacro( StoreDerivativeAsSparseFieldForLocalSupportTransforms );
326 itkSetMacro( CalculateValueAndDerivativeInTangentSpace,
bool );
327 itkGetConstMacro( CalculateValueAndDerivativeInTangentSpace,
bool );
328 itkBooleanMacro( CalculateValueAndDerivativeInTangentSpace );
334 void PrintSelf( std::ostream & os,
Indent indent )
const override;
366 virtual void InitializePointSets()
const;
372 virtual void InitializeForIteration()
const;
379 virtual SizeValueType CalculateNumberOfValidFixedPoints()
const;
391 void TransformFixedAndCreateVirtualPointSet()
const;
399 void TransformMovingPointSet()
const;
405 void InitializePointsLocators()
const;
418 return Superclass::POINT_SET_METRIC;
439 #ifndef ITK_MANUAL_INSTANTIATION
440 #include "itkPointSetToPointSetMetricv4.hxx"
typename Superclass::MovingDisplacementFieldTransformType DisplacementFieldTransformType
void SetFixedObject(const ObjectType *object) override
typename VirtualImageType::SizeType VirtualRadiusType
Light weight base class for most itk classes.
typename VirtualImageType::RegionType VirtualRegionType
MovingPointSetType::ConstPointer m_MovingPointSet
typename FixedTransformType::ParametersType FixedTransformParametersType
typename FixedTransformType::Pointer FixedTransformPointer
bool SupportsArbitraryVirtualDomainSamples() const override
typename VirtualPointSetType::Pointer VirtualPointSetPointer
FixedPointSetType::ConstPointer m_FixedPointSet
typename VirtualImageType::PixelType VirtualPixelType
unsigned long SizeValueType
TInternalComputationValueType ParametersValueType
Computes similarity between two point sets.
typename TreeType::InstanceIdentifierVectorType NeighborsIdentifierType
bool m_CalculateValueAndDerivativeInTangentSpace
typename VirtualImageType::PointType VirtualPointType
typename DerivativeType::ValueType DerivativeValueType
Computes similarity between regions of two objects.
typename FixedTransformType::InputPointType FixedInputPointType
typename FixedTransformType::JacobianType JacobianType
bool m_MovingTransformPointLocatorsNeedInitialization
TPointSet FixedPointSetType
Simulate a standard C array with copy semnatics.
typename PointType::CoordRepType CoordRepType
typename Superclass::MeasureType MeasureType
FixedPointsContainer PointsContainer
typename MovingTransformType::OutputPointType MovingOutputPointType
VirtualPointSetPointer m_VirtualTransformedPointSet
Accelerate geometric searches for points.
PointsLocatorType::Pointer m_MovingTransformedPointsLocator
typename VirtualImageType::PointType VirtualOriginType
bool m_HaveWarnedAboutNumberOfValidPoints
typename TPointSet::PixelType FixedPixelType
typename FixedTransformType::OutputPointType FixedOutputPointType
MetricCategoryType GetMetricCategory() const override
typename PointsLocatorType::NeighborsIdentifierType NeighborsIdentifierType
typename TPointSet::PointType FixedPointType
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
typename TPointSet::PointType MovingPointType
unsigned long ModifiedTimeType
bool m_StoreDerivativeAsSparseFieldForLocalSupportTransforms
typename FixedTransformType::JacobianType FixedTransformJacobianType
unsigned int NumberOfParametersType
typename VirtualImageType::IndexType VirtualIndexType
ModifiedTimeType m_FixedTransformedPointSetTime
typename VirtualImageType::Pointer VirtualImagePointer
typename MovingTransformType::ParametersType MovingTransformParametersType
typename TPointSet::PointsContainer MovingPointsContainer
SizeValueType DimensionType
typename MovingTransformType::Pointer MovingTransformPointer
typename TPointSet::PointsContainer FixedPointsContainer
PointsLocatorType::Pointer m_FixedTransformedPointsLocator
FixedTransformedPointSetType::Pointer m_FixedTransformedPointSet
typename TPointSet::PixelType MovingPixelType
Control indentation during Print() invocation.
ImageBaseType::PointType PointType
typename VirtualRegionType::SizeType VirtualSizeType
typename PointsContainer::ConstIterator PointsConstIterator
ModifiedTimeType m_MovingTransformedPointSetTime
typename Superclass::DerivativeType DerivativeType
TPointSet MovingPointSetType
MovingTransformedPointSetType::Pointer m_MovingTransformedPointSet
typename VirtualImageType::SpacingType VirtualSpacingType
Base class for most ITK classes.
void SetMovingObject(const ObjectType *object) override
typename VirtualImageType::DirectionType VirtualDirectionType
typename MovingTransformType::InputPointType MovingInputPointType
bool m_FixedTransformPointLocatorsNeedInitialization
typename MovingTransformType::JacobianType MovingTransformJacobianType
Templated n-dimensional image class.
typename PointsContainer::ElementIdentifier PointIdentifier