MITK/MITK — pull request #61 by espakm (2014-05-23 01:25:53+00:00)
Title: SliceGeometry3D initialisation fix for non-image geometries

For non-image geometries the origin of the first slice and the origin
of the 3D volume does not match. The origin of the 2D planes is at the
bottom-left corner of their bottom-left pixel, but along the z axis they
must be at the middle of a 3D voxel. The origin of the 3D volume, however,
should be in the bottom-left-back corner of the bottom-left-back voxel.
That means that the origin of the first 2D slice is half voxel far from
the origin of the 3D volume along the the direction that is orthogonal to
the 2D plane.

The 2D geometries must be in the middle of voxel (e.g. they are used for
the crosshair planes) and this is currently done correctly. However, the
origin of the 3D volume is now the same as the origin of the first slice
what is wrong, and causes various problems.

This fix sets the correct offset for the translation matrix of the 3D
geometry. The offset is the same as the offset of the first plane geometry
minus half spacing along the direction orthogonal to the plane.

Conflicts:
Core/Code/DataManagement/mitkSlicedGeometry3D.cpp

Signed-off-by: Miklos Espak