HomePhabricator
Diffusion MITK f34cc3982951

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
gochCommitted on Nov 29 2016, 1:56 PM
gochPushed on Nov 29 2016, 1:57 PM
Parents
rMITKc5b9d75a7660: Merge branch 'T20070-fix-cpu-volume-rendering-crash'
Branches
Unknown
Tags
Unknown