18 #ifndef itkPointSetToPointSetMetricv4_h
19 #define itkPointSetToPointSetMetricv4_h
69 template<
typename TFixedPointSet,
typename TMovingPointSet,
70 class TInternalComputationValueType =
double>
73 Image<TInternalComputationValueType, TFixedPointSet::PointDimension>, TInternalComputationValueType>
80 TMovingPointSet::PointDimension,
90 typedef typename Superclass::MeasureType
MeasureType;
130 itkStaticConstMacro( FixedPointDimension,
DimensionType, Superclass::FixedDimension );
138 itkStaticConstMacro( MovingPointDimension,
DimensionType, Superclass::MovingDimension );
146 itkStaticConstMacro( PointDimension,
DimensionType, Superclass::FixedDimension );
184 if( pointSet != ITK_NULLPTR )
186 this->SetFixedPointSet( pointSet );
190 itkExceptionMacro(
"Incorrect object type. Should be a point set." )
199 if( pointSet != ITK_NULLPTR )
201 this->SetMovingPointSet( pointSet );
205 itkExceptionMacro(
"Incorrect object type. Should be a point set." )
211 itkSetConstObjectMacro( FixedPointSet, FixedPointSetType );
212 itkGetConstObjectMacro( FixedPointSet, FixedPointSetType );
216 itkGetModifiableObjectMacro( FixedTransformedPointSet, FixedTransformedPointSetType );
219 itkSetConstObjectMacro( MovingPointSet, MovingPointSetType );
220 itkGetConstObjectMacro( MovingPointSet, MovingPointSetType );
224 itkGetModifiableObjectMacro( MovingTransformedPointSet, MovingTransformedPointSetType );
241 virtual MeasureType GetValue() const ITK_OVERRIDE;
253 virtual
void GetDerivative( DerivativeType & ) const ITK_OVERRIDE;
265 virtual
void GetValueAndDerivative( MeasureType &, DerivativeType & ) const ITK_OVERRIDE;
272 virtual MeasureType GetLocalNeighborhoodValue( const
PointType &, const PixelType & pixel ) const = 0;
278 virtual LocalDerivativeType GetLocalNeighborhoodDerivative( const PointType &, const PixelType & pixel ) const;
284 virtual
void GetLocalNeighborhoodValueAndDerivative( const PointType &,
285 MeasureType &, LocalDerivativeType &, const PixelType & pixel ) const = 0;
291 const VirtualPointSetType * GetVirtualTransformedPointSet() const;
297 virtual
void Initialize(
void ) ITK_OVERRIDE;
299 virtual
bool SupportsArbitraryVirtualDomainSamples(
void ) const ITK_OVERRIDE
317 itkSetMacro( StoreDerivativeAsSparseFieldForLocalSupportTransforms,
bool );
318 itkGetConstMacro( StoreDerivativeAsSparseFieldForLocalSupportTransforms,
bool );
319 itkBooleanMacro( StoreDerivativeAsSparseFieldForLocalSupportTransforms );
325 itkSetMacro( CalculateValueAndDerivativeInTangentSpace,
bool );
326 itkGetConstMacro( CalculateValueAndDerivativeInTangentSpace,
bool );
327 itkBooleanMacro( CalculateValueAndDerivativeInTangentSpace );
333 void PrintSelf( std::ostream & os,
Indent indent ) const ITK_OVERRIDE;
352 bool m_UsePointSetData;
361 bool m_CalculateValueAndDerivativeInTangentSpace;
365 virtual
void InitializePointSets() const;
371 virtual
void InitializeForIteration() const;
378 virtual
SizeValueType CalculateNumberOfValidFixedPoints() const;
390 void TransformFixedAndCreateVirtualPointSet() const;
398 void TransformMovingPointSet() const;
404 void InitializePointsLocators() const;
415 virtual MetricCategoryType GetMetricCategory() const ITK_OVERRIDE
417 return Superclass::POINT_SET_METRIC;
440 #ifndef ITK_MANUAL_INSTANTIATION
441 #include "itkPointSetToPointSetMetricv4.hxx"
PointsContainer::ConstIterator PointsConstIterator
Superclass::MeasureType MeasureType
TInternalComputationValueType ValueType
Superclass::VirtualImageType VirtualImageType
Light weight base class for most itk classes.
PointSet< FixedPixelType, itkGetStaticConstMacro(PointDimension)> FixedTransformedPointSetType
PointsContainer::ElementIdentifier PointIdentifier
PointsLocatorType::NeighborsIdentifierType NeighborsIdentifierType
Superclass::VirtualSizeType VirtualSizeType
PointSet< MovingPixelType, itkGetStaticConstMacro(PointDimension)> MovingTransformedPointSetType
ObjectToObjectMetric< TFixedPointSet::PointDimension, TMovingPointSet::PointDimension, Image< TInternalComputationValueType, TFixedPointSet::PointDimension >, TInternalComputationValueType > Superclass
Superclass::FixedTransformParametersType FixedTransformParametersType
Superclass::VirtualPointSetType VirtualPointSetType
Superclass::DimensionType DimensionType
TMovingPointSet MovingPointSetType
unsigned long ModifiedTimeType
Computes similarity between two point sets.
Superclass::MovingInputPointType MovingInputPointType
PointsLocator< PointsContainer > PointsLocatorType
PointType::CoordRepType CoordRepType
Superclass::MovingOutputPointType MovingOutputPointType
Computes similarity between regions of two objects.
bool m_MovingTransformPointLocatorsNeedInitialization
Superclass::VirtualPixelType VirtualPixelType
SmartPointer< const Self > ConstPointer
unsigned long SizeValueType
Superclass::DerivativeType DerivativeType
Superclass::VirtualSpacingType VirtualSpacingType
TFixedPointSet::PointsContainer FixedPointsContainer
Simulate a standard C array with copy semnatics.
Superclass::VirtualImagePointer VirtualImagePointer
Superclass::VirtualPointType VirtualPointType
TFixedPointSet FixedPointSetType
FixedPointsContainer PointsContainer
Accelerate geometric searches for points.
Superclass::VirtualIndexType VirtualIndexType
FixedArray< DerivativeValueType, itkGetStaticConstMacro(PointDimension)> LocalDerivativeType
bool m_HaveWarnedAboutNumberOfValidPoints
SmartPointer< Self > Pointer
Superclass::VirtualSizeType VirtualRadiusType
Superclass::FixedOutputPointType FixedOutputPointType
ImageBaseType::PointType PointType
Superclass::JacobianType JacobianType
TFixedPointSet::PixelType FixedPixelType
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
Superclass::FixedTransformPointer FixedTransformPointer
Superclass::MovingDisplacementFieldTransformType DisplacementFieldTransformType
TFixedPointSet::PointType FixedPointType
Superclass::FixedTransformJacobianType FixedTransformJacobianType
bool m_StoreDerivativeAsSparseFieldForLocalSupportTransforms
ModifiedTimeType m_FixedTransformedPointSetTime
TMovingPointSet::PointsContainer MovingPointsContainer
TreeType::InstanceIdentifierVectorType NeighborsIdentifierType
Superclass::ObjectType ObjectType
Superclass::MovingTransformType MovingTransformType
Superclass::VirtualRegionType VirtualRegionType
Superclass::VirtualPointType VirtualOriginType
PointSetToPointSetMetricv4 Self
Superclass::ParametersType ParametersType
Superclass::MovingTransformPointer MovingTransformPointer
Superclass::MovingTransformJacobianType MovingTransformJacobianType
virtual void SetFixedObject(const ObjectType *object) override
virtual void SetMovingObject(const ObjectType *object) override
Control indentation during Print() invocation.
TMovingPointSet::PixelType MovingPixelType
ModifiedTimeType m_MovingTransformedPointSetTime
Superclass::MeasureType MeasureType
Base class for most ITK classes.
Superclass::FixedInputPointType FixedInputPointType
Superclass::FixedTransformType FixedTransformType
Superclass::VirtualPointSetPointer VirtualPointSetPointer
bool m_FixedTransformPointLocatorsNeedInitialization
Superclass::ParametersValueType ParametersValueType
Superclass::NumberOfParametersType NumberOfParametersType
SizeValueType DimensionType
Templated n-dimensional image class.
Superclass::MovingTransformParametersType MovingTransformParametersType
TMovingPointSet::PointType MovingPointType
Superclass::VirtualDirectionType VirtualDirectionType
DerivativeType::ValueType DerivativeValueType