Page MenuHomePhabricator

SlicedGeometry3D crash when volume is rotated by 45 degrees
Closed, WontfixPublic


Applications can crash because of a bug in mitk::PlaneGeometry and mitk::SlicedGeometry. The crash happens when reinitialising the renderers along a given orientation (sagittal, coronal or axial).

The crash happens because an invalid transformation matrix is created during the initialisation. This is because of the code I added to determine which axes is closest to the individual world orientations. In extreme cases when the volume is rotated exactly by 45 degrees, the same axis will be mapped to different orientations, and some axis will not be mapped to any orientations.

It is probably not common to have images which are rotated exactly by 45 degrees around some world axes. We discovered this because we have an affine transformation plugin that allows the user to apply any transformation on a volume interactively.

I will send a PR shortly.

Event Timeline

All the geometry tests of MITK pass on Linux, although probably there is not a test for this special case.

We still need to test it with our affine transform plugin.

What's the result? :)

Our tests failed. :-(

We are working on it...

I have to allow an epsilon difference for rounding error, but it is not enough, it still crashes when the volume is rotated around two world axes by 45 degrees. I get a matrix that I thought is invalid but it is not.

I sent a new PR and closed the previous one.

It is tested and works well for all the special cases.

kislinsk claimed this task.
kislinsk added a project: Auto-closed.

Hi there! 🙂

This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. 🚑

Best wishes,
The MITK devs

kislinsk removed kislinsk as the assignee of this task.May 26 2020, 12:05 PM
kislinsk removed a subscriber: kislinsk.