Page MenuHomePhabricator

3D Interpolation crashes or behaves strangely on tilted gantry images
Closed, ResolvedPublic

Description

  1. Load a tilted gantry image
  2. segment a layer
  3. go a few layers up or down
  4. Activate 3D Interpolation

Result is either a crash or a segmentation in form of a tilted cube that contains the whole segmentation. Crashes seem to be inconsistent... I have not found a way to reproduce them consistently.

Event Timeline

I tried to reproduce the bug with the given information.
The workbench or the plugin doesn't crash in my application but the tilted block appears every time I activated the 3D-Interpolation in a segmentation.

I found out how the crash appears, it is a little bit different to first Comment information:

  1. Load tilted image
  2. Create Segmentation
  3. Activate 3D-Interpolation
  4. Draw a Segmentation in the Sagittal-Renderwindow
  5. Draw a big circle Segmentation, that is nearly as big as the Axial-Renderwindow
  6. MITK crashes

MITK crashes in class mitkComputeContourSetNormalsFilter.cpp in function GenerateData()[Line 152]

It raises an unhandled exception with SurfaceInterpolation.dll.

May the problem is that the Image Read Access is not free for other segmentations.

If I reinit the segmentation, it doesn't crash any more.

MITK crashes if you segment tilted images out of the picture's area, not if you segment in the area.
Now I found out that there is a problem with the GetPixelByIndex, because the method isn't responsible for pixels out of the picture's area in tilted images.
This causes the crash.
And I changed the method from "GetPixelByIndex()" to "GetPixelByIndexSafe()".
The second one throws an exception which is caught but not handled at all.
The crash doesn't appear anymore.

There is a new conception which is different and we have to check this crash in the newest release version and for the tempo differences.

[62e97d]: Merge branch 'bug-16162-3dInterpolationCrashesOnTiltedImages'

Merged commits:

2013-11-13 16:03:58 Daniel Knorr [3abe8d]
Fixed the crash by replacing the GetPixelByWorldCoordinates method
with its internal structure exept the GetPixelByIndex method.
This one was changed to GetPixelByIndexSafe.