@Michael and @Esther: Could you please have a look at this and merge the pull request if everything is okay? Thanks.
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.
Signed-off-by: Miklos Espak email@example.com
You can merge this Pull Request by running
git pull https://github.com/NifTK/MITK bug-17618-SlicedGeometry3D-with-non-image-geometry
Or view, comment on, or merge it at: