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.Tue, Jul 21, 6:30 PM
floca created this task.
kislinsk moved this task from Backlog to Statistics on the MITK (2020) board.Wed, Jul 22, 10:49 AM
floca claimed this task.Thu, Jul 23, 11:38 AM
floca added a revision: Restricted Differential Revision.Thu, Jul 23, 5:14 PM
kislinsk reopened this task as Open.Tue, Jul 28, 5:18 AM
kislinsk added a subscriber: kislinsk.

The following tests fail on the continuous dart clients:

  • mitkNodePredicateGeometryTest
  • mitkNodePredicateSubGeometryTest
floca closed this task as Resolved.Tue, Jul 28, 1:58 PM