Page MenuHomePhabricator

2D segmentation is buggy if there is more than one CT image
Closed, ResolvedPublic


If there two CT images with different geometries, the "Add" tool of the 2D segmentation is very buggy. The area is added somewhere else (not in the actually marked area). In the coronal view the green preview is missing.

You can use the two CT images on E130-Daten/temp/Alfred/testdata to reproduce this bug.

Event Timeline

The reason for this bug might be the size/origin/extent of the current world-geometry which is used to extract the slice of the working image. In case of a global bounding geometry the size exeeds the geometry of the reference image.
If a 'reinit' is performed on the current reference image the ContourTool is working as expected. The strange behavior is present when a new segmentation is created and after a 'global reinit'.
Even more annoying is the fact that the view stays the same after creating a segmentation on a different segmentation image (with 'reinit' performed on current). Thus no contours are ever visible because the renderwindow only shows the previous reference image.
A simple 'reinit' might fixed this issue for the user but will not resolve the bug itself.

I assume that it can't be fixed within release 2013-09 as it will cause some redesign of the current usage of mitk::PlaneGeometry during segmentation. Setting target milestone to AfterNextRelease.

I tried a "global reinit" of the scene after loading, but it doesn't help. The strange behaviour is still the same after the reinit.

Setting the milestone back to this release. In my eyes this ist a VERY serious bug.

If there is a quickfix (like a reinit or something else), I would still leave this bug open for this release until someone integrates this quickfix into the master.

As far as I remember we had that reinit in the segmentation plugin before the UI redesign.
I had a look at git commit history:
The reinit was gone with commit 7944e892 "General code cleaning. Removed a lot of functions which are obsolet or unnecessary by now."
ForceDisplayPreferencesUponAllImages() was deleted. In this function the actual reinit was done by
// Reinit current node

mitk::RenderingManager::REQUEST_UPDATE_ALL, true );

New remote branch pushed: bug-16063-2D-segmentation-is-buggy-with-more-than-one-image

Does anyone know why this code was deleted? Was there an actual reason or had it been just accidentally removed with other code.

The branch provides a quickfix with 'reinit' for CreateNewSegmentation and PatientComboBoxSelectionChanged events.
The bug still remains if the user performs a 'global reinit'.

New remote branch pushed: bug-16063-segmentation-buggy-with-several-images

[ea8756]: Merge branch 'bug-16063-segmentation-buggy-with-several-images'

Merged commits:

2013-09-23 13:42:53 Andreas Fetzer [9930ea]
If segmentation image geometry is not equal to the worldgeometry disable the tools

I implemented a workaround for this behavior. Now you have to perform a reinit on the segmentation image if you want to do manual segmentation and the world geometry and the segmentation image geometry are not aligned.

We should find a way to avoid that however. This issue will be tracked in T16132