HomePhabricator
Diffusion MITK 23fa66f513d7

Correcting origin and bounds for geometry calculated from data storage

Description

Correcting origin and bounds for geometry calculated from data storage

The mitk::DataStorage::ComputeBoundingGeometry3D function creates a
non-image geometry from a set of data nodes but it did not set the
origin. The origin stayed at (0, 0, 0).

The bounds had continuous coordinates relative to the origin. The bounds
were initialised based on the mm coordinates of the corner points, and
although they were converted to continuous index coordinates, the start
bounds were negative. (At least when the data storage only had images.)

However, since the created geometry is a non-image geometry, the origin
should be in the voxel corner, and the bounding box coordinates should be
relative to it.

This change sets the origin to the bottom-left-back corner point and
sets the bounds relative to it. The lower bound values are 0 and the
upper bounds are the volume dimension / minimum spacing.

Signed-off-by: Miklos Espak <m.espak@ucl.ac.uk>

Details

Provenance
espakAuthored on Oct 5 2016, 6:05 PM
kislinskPushed on Dec 19 2016, 12:51 PM
Parents
rMITK3caebdcb3d5e: Current world position re-calculated before updating status bar
Branches
Unknown
Tags
Unknown