Page MenuHomePhabricator

DataStorage::ComputeBoundingBox3D creates geometry with incorrect origin and bounding box
Closed, ResolvedPublic

Assigned To
Authored By
espak
Nov 2 2016, 12:02 PM
Referenced Files
F25236: test2.nrrd
Nov 18 2016, 4:24 PM
F25237: test3.nrrd
Nov 18 2016, 4:24 PM
F25238: test4.nrrd
Nov 18 2016, 4:24 PM
F25235: test.nrrd
Nov 18 2016, 4:24 PM

Description

Although the created geometry is a non-image geometry, it's origin is left in the (0, 0, 0) mm position, and the bounding box lower bounds are negative to compensate this. Moreover, the spacings are not permuted according to order of the input geometry axes, therefore the upper bounds are also incorrect if the input geometry is an image with anisotropic voxels.

Related Objects

Event Timeline

Test images for validating the proposed changes:

As soon as we have an image spacing other than 1, we have indeed an error in our calculations. Everything else seems to be the difference between object space and global space, which is why the missing offset was "okay", though.

The calculation in your fix is correct.

We still have to check the permuted thingy, though.

kislinsk moved this task from Backlog to Suggested on the MITK (2016-11) board.