Page MenuHomePhabricator

Extend mitk:Equal (for geometries) and mitk::IsSubGeometry to allow an eps for direction and spatial aspects
Closed, ResolvedPublic

Description

Currently the functions mitk::Equal (for geometries) and mitk::IsSubGeometry only offer to pass one eps for the check.
But sometimes (see e.g. MaskUtilities) you want a different eps for the spatial aspects (spacing, origin, ...) or the directions/orientation. Currently it is solved by own boilerplate code.

Introduce a overload versions

bool mitk::Equal(const mitk::BaseGeometry &leftHandSide,
              const mitk::BaseGeometry &rightHandSide,
              ScalarType spatialEps, ScalarType directionalEps,
              bool verbose)

bool mitk::IsSubGeometry(const mitk::BaseGeometry& testGeo,
  const mitk::BaseGeometry& referenceGeo,
  ScalarType spatialEps,
  ScalarType directionalEps,
  bool verbose)

the old versions just call the new one and use their eps for spatial and directional eps.

Revisions and Commits

rMITK MITK
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision

Event Timeline

floca triaged this task as High priority.Jul 21 2020, 6:30 PM
floca created this task.
floca added a revision: Restricted Differential Revision.Jul 23 2020, 5:14 PM
kislinsk added a subscriber: kislinsk.

The following tests fail on the continuous dart clients:

  • mitkNodePredicateGeometryTest
  • mitkNodePredicateSubGeometryTest