template<typename TPointSet, class TInternalComputationValueType = double>
class itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4< TPointSet, TInternalComputationValueType >
Implementation of the Jensen Havrda Charvat Tsallis Point Set metric.
Given a specified transform and direction, this class calculates the value and derivative between a "fixed" and "moving" point set pair using the Havrda-Charvat-Tsallis entropy family, a generalization of the well-known Shannon entropy, and the Jensen divergence. Another way to look at the family of information-theoretic measures is that the points are used to construct the corresponding probably density functions.
In addition, we allow the user to invoke a manifold parzen windowing of the data. Instead of an isotropic Gaussian being associated with each point, we can actually calculate the covariance matrix for each point such that it reflects the locate point set structure.
To speed up the metric calculation, we use ITK's K-d tree to query the metric value only for a given neighborhood. Considering that probably only a small subset of points is needed to get a good approximation of the metric value for a single point, this is probably warranted. So what we do is transform each point (with the specified transform) and construct the k-d tree from the transformed points.
Contributed by Nicholas J. Tustison, James C. Gee in the Insight Journal paper: https://doi.org/10.54294/791z7t
- Note
- The original work reported in Tustison et al. 2011 optionally employed a regularization term to prevent the moving point set(s) from coalescing to a single point location. However, within the registration framework, this term is of limited utility as such regularization is dictated by the transform and any explicit regularization terms. Also note that the published work applies to multiple points sets each of which could be considered "moving" but this is also not applicable for this particular implementation.
- REFERENCE
N.J. Tustison, S. P. Awate, G. Song, T. S. Cook, and J. C. Gee. "Point set registration using Havrda-Charvat-Tsallis entropy measures" IEEE Transactions on Medical Imaging, 30(2):451-60, 2011.
Definition at line 72 of file itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h.
|
using | ConstPointer = SmartPointer< const Self > |
|
using | DensityFunctionPointer = typename DensityFunctionType::Pointer |
|
using | DensityFunctionType = ManifoldParzenWindowsPointSetFunction< PointSetType, RealType > |
|
using | GaussianType = typename DensityFunctionType::GaussianType |
|
using | Pointer = SmartPointer< Self > |
|
using | PointsContainer = typename PointSetType::PointsContainer |
|
using | PointsContainerConstIterator = typename PointsContainer::ConstIterator |
|
using | PointSetType = TPointSet |
|
using | RealType = MeasureType |
|
using | Self = JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4 |
|
using | Superclass = PointSetToPointSetMetricv4< TPointSet, TPointSet, TInternalComputationValueType > |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | CoordRepType = typename PointType::CoordRepType |
|
using | DisplacementFieldTransformType = typename Superclass::MovingDisplacementFieldTransformType |
|
using | FixedPixelType = typename TFixedPointSet::PixelType |
|
using | FixedPointsContainer = typename TFixedPointSet::PointsContainer |
|
using | FixedPointSetType = TPointSet |
|
using | FixedPointType = typename TFixedPointSet::PointType |
|
using | MovingPixelType = typename TMovingPointSet::PixelType |
|
using | MovingPointsContainer = typename TMovingPointSet::PointsContainer |
|
using | MovingPointSetType = TPointSet |
|
using | MovingPointType = typename TMovingPointSet::PointType |
|
using | NeighborsIdentifierType = typename PointsLocatorType::NeighborsIdentifierType |
|
using | Pointer = SmartPointer< Self > |
|
using | PointsConstIterator = typename PointsContainer::ConstIterator |
|
using | PointsContainer = FixedPointsContainer |
|
using | Self = PointSetToPointSetMetricv4 |
|
using | Superclass = PointSetToPointSetMetricWithIndexv4< TPointSet, TPointSet, double > |
|
using | VirtualImageType = typename Superclass::VirtualImageType |
|
using | VirtualOriginType = typename Superclass::VirtualPointType |
|
using | VirtualRadiusType = typename Superclass::VirtualSizeType |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | CoordRepType = typename PointType::CoordRepType |
|
using | DerivativeValueType = typename DerivativeType::ValueType |
|
using | DisplacementFieldTransformType = typename Superclass::MovingDisplacementFieldTransformType |
|
using | FixedPixelType = typename TFixedPointSet::PixelType |
|
using | FixedPointsContainer = typename TFixedPointSet::PointsContainer |
|
using | FixedPointSetType = TPointSet |
|
using | FixedPointType = typename TFixedPointSet::PointType |
|
using | FixedTransformedPointSetType = PointSet< FixedPixelType, Self::PointDimension > |
|
using | LocalDerivativeType = FixedArray< DerivativeValueType, Self::PointDimension > |
|
using | MovingPixelType = typename TMovingPointSet::PixelType |
|
using | MovingPointsContainer = typename TMovingPointSet::PointsContainer |
|
using | MovingPointSetType = TPointSet |
|
using | MovingPointType = typename TMovingPointSet::PointType |
|
using | MovingTransformedPointSetType = PointSet< MovingPixelType, Self::PointDimension > |
|
using | NeighborsIdentifierType = typename PointsLocatorType::NeighborsIdentifierType |
|
using | ObjectType = typename Superclass::ObjectType |
|
using | PixelType = FixedPixelType |
|
using | Pointer = SmartPointer< Self > |
|
using | PointIdentifier = typename PointsContainer::ElementIdentifier |
|
using | PointsConstIterator = typename PointsContainer::ConstIterator |
|
using | PointsContainer = FixedPointsContainer |
|
using | PointsLocatorType = PointsLocator< PointsContainer > |
|
using | PointType = FixedPointType |
|
using | Self = PointSetToPointSetMetricWithIndexv4 |
|
using | Superclass = ObjectToObjectMetric< TFixedPointSet::PointDimension, TMovingPointSet::PointDimension, Image< double, TFixedPointSet::PointDimension >, double > |
|
using | VirtualImageType = typename Superclass::VirtualImageType |
|
using | VirtualOriginType = typename Superclass::VirtualPointType |
|
using | VirtualRadiusType = typename Superclass::VirtualSizeType |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | CoordinateRepresentationType = double |
|
using | DimensionType = SizeValueType |
|
using | FixedInputPointType = typename FixedTransformType::InputPointType |
|
using | FixedOutputPointType = typename FixedTransformType::OutputPointType |
|
using | FixedTransformJacobianType = typename FixedTransformType::JacobianType |
|
using | FixedTransformParametersType = typename FixedTransformType::ParametersType |
|
using | FixedTransformPointer = typename FixedTransformType::Pointer |
|
using | FixedTransformType = Transform< double, TVirtualImage::ImageDimension, TFixedDimension > |
|
using | InternalComputationValueType = double |
|
using | JacobianType = typename FixedTransformType::JacobianType |
|
using | MetricCategoryType = typename Superclass::MetricCategoryEnum |
|
using | MovingDisplacementFieldTransformType = DisplacementFieldTransform< CoordinateRepresentationType, Self::MovingDimension > |
|
using | MovingInputPointType = typename MovingTransformType::InputPointType |
|
using | MovingOutputPointType = typename MovingTransformType::OutputPointType |
|
using | MovingTransformJacobianType = typename MovingTransformType::JacobianType |
|
using | MovingTransformParametersType = typename MovingTransformType::ParametersType |
|
using | MovingTransformPointer = typename MovingTransformType::Pointer |
|
using | MovingTransformType = Transform< double, TVirtualImage::ImageDimension, TMovingDimension > |
|
using | ObjectType = typename Superclass::Object |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = ObjectToObjectMetric |
|
using | Superclass = ObjectToObjectMetricBaseTemplate< double > |
|
using | VirtualDirectionType = typename VirtualImageType::DirectionType |
|
using | VirtualImageConstPointer = typename VirtualImageType::ConstPointer |
|
using | VirtualImagePointer = typename VirtualImageType::Pointer |
|
using | VirtualImageType = Image< double, TFixedPointSet::PointDimension > |
|
using | VirtualIndexType = typename VirtualImageType::IndexType |
|
using | VirtualOriginType = typename VirtualImageType::PointType |
|
using | VirtualPixelType = typename VirtualImageType::PixelType |
|
using | VirtualPointSetPointer = typename VirtualPointSetType::Pointer |
|
using | VirtualPointSetType = PointSet< VirtualPixelType, Self::VirtualDimension > |
|
using | VirtualPointType = typename VirtualImageType::PointType |
|
using | VirtualRadiusType = typename VirtualImageType::SizeType |
|
using | VirtualRegionType = typename VirtualImageType::RegionType |
|
using | VirtualSizeType = typename VirtualRegionType::SizeType |
|
using | VirtualSpacingType = typename VirtualImageType::SpacingType |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | CoordinateRepresentationType = double |
|
using | DerivativeValueType = typename DerivativeType::ValueType |
|
using | GradientSourceEnum = itk::ObjectToObjectMetricBaseTemplateEnums::GradientSource |
|
using | MetricCategoryEnum = itk::ObjectToObjectMetricBaseTemplateEnums::MetricCategory |
|
using | NumberOfParametersType = unsigned int |
|
using | ObjectConstPointer = typename ObjectType::ConstPointer |
|
using | ObjectType = Object |
|
using | ParametersValueType = double |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = ObjectToObjectMetricBaseTemplate |
|
using | Superclass = SingleValuedCostFunctionv4Template< double > |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | DerivativeType = Array< double > |
|
using | MeasureType = double |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = SingleValuedCostFunctionv4Template |
|
using | Superclass = CostFunctionTemplate< double > |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | ParametersType = OptimizerParameters< double > |
|
using | ParametersValueType = double |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = CostFunctionTemplate |
|
using | Superclass = Object |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = Object |
|
using | Superclass = LightObject |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = LightObject |
|
|
virtual RealType | GetAlpha () const |
|
virtual unsigned int | GetCovarianceKNeighborhood () const |
|
virtual unsigned int | GetEvaluationKNeighborhood () const |
|
virtual RealType | GetKernelSigma () const |
|
MeasureType | GetLocalNeighborhoodValue (const PointType &point, const PixelType &pixel=0) const override |
|
void | GetLocalNeighborhoodValueAndDerivative (const PointType &, MeasureType &, LocalDerivativeType &, const PixelType &pixel=0) const override |
|
const char * | GetNameOfClass () const override |
|
virtual RealType | GetPointSetSigma () const |
|
virtual bool | GetUseAnisotropicCovariances () const |
|
void | Initialize () override |
|
LightObject::Pointer | InternalClone () const override |
|
virtual void | SetAlpha (RealType _arg) |
|
virtual void | SetCovarianceKNeighborhood (unsigned int _arg) |
|
virtual void | SetEvaluationKNeighborhood (unsigned int _arg) |
|
virtual void | SetKernelSigma (RealType _arg) |
|
virtual void | SetPointSetSigma (RealType _arg) |
|
virtual void | SetUseAnisotropicCovariances (bool _arg) |
|
virtual void | UseAnisotropicCovariancesOn () |
|
virtual LocalDerivativeType | GetLocalNeighborhoodDerivative (const PointType &, const PixelType &pixel) const |
|
virtual MeasureType | GetLocalNeighborhoodValue (const PointType &, const PixelType &pixel) const=0 |
|
virtual void | GetLocalNeighborhoodValueAndDerivative (const PointType &, MeasureType &, LocalDerivativeType &, const PixelType &pixel) const=0 |
|
const char * | GetNameOfClass () const override |
|
void | GetDerivative (DerivativeType &) const override |
|
virtual FixedTransformedPointSetType * | GetModifiableFixedTransformedPointSet () |
|
virtual MovingTransformedPointSetType * | GetModifiableMovingTransformedPointSet () |
|
const char * | GetNameOfClass () const override |
|
SizeValueType | GetNumberOfComponents () const |
|
MeasureType | GetValue () const override |
|
void | GetValueAndDerivative (MeasureType &, DerivativeType &) const override |
|
const VirtualPointSetType * | GetVirtualTransformedPointSet () const |
|
void | Initialize () override |
|
bool | SupportsArbitraryVirtualDomainSamples () const override |
|
void | SetFixedObject (const ObjectType *object) override |
|
void | SetMovingObject (const ObjectType *object) override |
|
virtual void | SetFixedPointSet (const FixedPointSetType *_arg) |
|
virtual const FixedPointSetType * | GetFixedPointSet () const |
|
virtual void | SetMovingPointSet (const MovingPointSetType *_arg) |
|
virtual const MovingPointSetType * | GetMovingPointSet () const |
|
virtual void | SetStoreDerivativeAsSparseFieldForLocalSupportTransforms (bool _arg) |
|
virtual bool | GetStoreDerivativeAsSparseFieldForLocalSupportTransforms () const |
|
virtual void | StoreDerivativeAsSparseFieldForLocalSupportTransformsOn () |
|
virtual void | SetCalculateValueAndDerivativeInTangentSpace (bool _arg) |
|
virtual bool | GetCalculateValueAndDerivativeInTangentSpace () const |
|
virtual void | CalculateValueAndDerivativeInTangentSpaceOn () |
|
OffsetValueType | ComputeParameterOffsetFromVirtualIndex (const VirtualIndexType &index, const NumberOfParametersType &numberOfLocalParameters) const |
|
OffsetValueType | ComputeParameterOffsetFromVirtualPoint (const VirtualPointType &point, const NumberOfParametersType &numberOfLocalParameters) const |
|
MetricCategoryType | GetMetricCategory () const override |
|
virtual FixedTransformType * | GetModifiableFixedTransform () |
|
virtual MovingTransformType * | GetModifiableMovingTransform () |
|
virtual VirtualImageType * | GetModifiableVirtualImage () |
|
const char * | GetNameOfClass () const override |
|
NumberOfParametersType | GetNumberOfLocalParameters () const override |
|
NumberOfParametersType | GetNumberOfParameters () const override |
|
virtual SizeValueType | GetNumberOfValidPoints () const |
|
const ParametersType & | GetParameters () const override |
|
const MovingTransformType * | GetTransform () |
|
VirtualDirectionType | GetVirtualDirection () const |
|
virtual const TimeStamp & | GetVirtualDomainTimeStamp () const |
|
VirtualOriginType | GetVirtualOrigin () const |
|
const VirtualRegionType & | GetVirtualRegion () const |
|
VirtualSpacingType | GetVirtualSpacing () const |
|
bool | HasLocalSupport () const override |
|
void | Initialize () override |
|
virtual void | SetFixedTransform (FixedTransformType *_arg) |
|
virtual void | SetMovingTransform (MovingTransformType *_arg) |
|
void | SetParameters (ParametersType ¶ms) override |
|
void | SetTransform (MovingTransformType *transform) |
|
void | SetVirtualDomain (const VirtualSpacingType &spacing, const VirtualOriginType &origin, const VirtualDirectionType &direction, const VirtualRegionType ®ion) |
|
void | SetVirtualDomainFromImage (const VirtualImageType *virtualImage) |
|
virtual bool | SupportsArbitraryVirtualDomainSamples () const=0 |
|
void | UpdateTransformParameters (const DerivativeType &derivative, double factor) override |
|
bool | IsInsideVirtualDomain (const VirtualPointType &point) const |
|
bool | IsInsideVirtualDomain (const VirtualIndexType &index) const |
|
MeasureType | GetCurrentValue () const |
|
virtual void | GetDerivative (DerivativeType &) const=0 |
|
virtual GradientSourceEnum | GetGradientSource () const |
|
bool | GetGradientSourceIncludesFixed () const |
|
bool | GetGradientSourceIncludesMoving () const |
|
virtual MetricCategoryEnum | GetMetricCategory () const |
|
const char * | GetNameOfClass () const override |
|
virtual const ParametersType & | GetParameters () const=0 |
|
MeasureType | GetValue () const override=0 |
|
void | GetValueAndDerivative (MeasureType &value, DerivativeType &derivative) const override=0 |
|
virtual bool | HasLocalSupport () const=0 |
|
virtual void | Initialize ()=0 |
|
virtual void | SetGradientSource (GradientSourceEnum _arg) |
|
virtual void | SetParameters (ParametersType ¶ms)=0 |
|
virtual void | UpdateTransformParameters (const DerivativeType &derivative, ParametersValueType factor=NumericTraits< ParametersValueType >::OneValue())=0 |
|
virtual void | SetFixedObject (const ObjectType *_arg) |
|
virtual const ObjectType * | GetFixedObject () const |
|
virtual void | SetMovingObject (const ObjectType *_arg) |
|
virtual const ObjectType * | GetMovingObject () const |
|
const char * | GetNameOfClass () const override |
|
virtual MeasureType | GetValue () const=0 |
|
virtual void | GetValueAndDerivative (MeasureType &value, DerivativeType &derivative) const=0 |
|
const char * | GetNameOfClass () const override |
|
virtual unsigned int | GetNumberOfParameters () const=0 |
|
unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
|
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
|
LightObject::Pointer | CreateAnother () const override |
|
virtual void | DebugOff () const |
|
virtual void | DebugOn () const |
|
Command * | GetCommand (unsigned long tag) |
|
bool | GetDebug () const |
|
MetaDataDictionary & | GetMetaDataDictionary () |
|
const MetaDataDictionary & | GetMetaDataDictionary () const |
|
virtual ModifiedTimeType | GetMTime () const |
|
const char * | GetNameOfClass () const override |
|
virtual const TimeStamp & | GetTimeStamp () const |
|
bool | HasObserver (const EventObject &event) const |
|
void | InvokeEvent (const EventObject &) |
|
void | InvokeEvent (const EventObject &) const |
|
virtual void | Modified () const |
|
void | Register () const override |
|
void | RemoveAllObservers () |
|
void | RemoveObserver (unsigned long tag) const |
|
void | SetDebug (bool debugFlag) const |
|
void | SetReferenceCount (int) override |
|
void | UnRegister () const noexcept override |
|
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
|
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
|
virtual void | SetObjectName (std::string _arg) |
|
virtual const std::string & | GetObjectName () const |
|
Pointer | Clone () const |
|
virtual Pointer | CreateAnother () const |
|
virtual void | Delete () |
|
virtual const char * | GetNameOfClass () const |
|
virtual int | GetReferenceCount () const |
|
void | Print (std::ostream &os, Indent indent=0) const |
|
virtual void | Register () const |
|
virtual void | SetReferenceCount (int) |
|
virtual void | UnRegister () const noexcept |
|
|
void | ComputeValueAndDerivative (const PointType &samplePoint, MeasureType &value, LocalDerivativeType &derivativeReturn, bool calcValue, bool calcDerivative) const |
|
| JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4 () |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
bool | RequiresFixedPointsLocator () const override |
|
bool | RequiresMovingPointsLocator () const override |
|
| ~JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4 () override=default |
|
| PointSetToPointSetMetricv4 ()=default |
|
| ~PointSetToPointSetMetricv4 () override=default |
|
virtual SizeValueType | CalculateNumberOfValidFixedPoints () const |
|
void | CalculateValueAndDerivative (MeasureType &calculatedValue, DerivativeType &derivative, bool calculateValue) const |
|
virtual LocalDerivativeType | GetLocalNeighborhoodDerivativeWithIndex (const PointIdentifier &, const PointType &, const PixelType &pixel) const |
|
virtual void | GetLocalNeighborhoodValueAndDerivativeWithIndex (const PointIdentifier &, const PointType &, MeasureType &, LocalDerivativeType &, const PixelType &pixel) const=0 |
|
virtual MeasureType | GetLocalNeighborhoodValueWithIndex (const PointIdentifier &, const PointType &, const PixelType &pixel) const=0 |
|
MetricCategoryType | GetMetricCategory () const override |
|
virtual void | InitializeForIteration () const |
|
virtual void | InitializePointSets () const |
|
void | InitializePointsLocators () const |
|
| PointSetToPointSetMetricWithIndexv4 () |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
virtual bool | RequiresFixedPointsLocator () const |
|
virtual bool | RequiresMovingPointsLocator () const |
|
void | StorePointDerivative (const VirtualPointType &, const DerivativeType &, DerivativeType &) const |
|
void | TransformFixedAndCreateVirtualPointSet () const |
|
void | TransformMovingPointSet () const |
|
| ~PointSetToPointSetMetricWithIndexv4 () override=default |
|
const MovingDisplacementFieldTransformType * | GetMovingDisplacementFieldTransform () const |
|
| ObjectToObjectMetric () |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
bool | TransformPhysicalPointToVirtualIndex (const VirtualPointType &, VirtualIndexType &) const |
|
void | TransformVirtualIndexToPhysicalPoint (const VirtualIndexType &, VirtualPointType &) const |
|
virtual void | VerifyDisplacementFieldSizeAndPhysicalSpace () |
|
bool | VerifyNumberOfValidPoints (MeasureType &value, DerivativeType &derivative) const |
|
| ~ObjectToObjectMetric () override=default |
|
| ObjectToObjectMetricBaseTemplate () |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
| ~ObjectToObjectMetricBaseTemplate () override=default |
|
| SingleValuedCostFunctionv4Template ()=default |
|
| ~SingleValuedCostFunctionv4Template () override=default |
|
| CostFunctionTemplate ()=default |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
| ~CostFunctionTemplate () override=default |
|
| Object () |
|
bool | PrintObservers (std::ostream &os, Indent indent) const |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
|
| ~Object () override |
|
virtual LightObject::Pointer | InternalClone () const |
|
| LightObject () |
|
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
|
virtual void | PrintSelf (std::ostream &os, Indent indent) const |
|
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
|
virtual | ~LightObject () |
|