Page MenuHomePhabricator | MITK

MITK Workbench crashes trying to create smoothed polygon
Closed, ResolvedPublic


Occurs on Windows 7 64bit Release and Master

Loaded a segmentation, right clicked and chose to create a smoothed polygon --> MitkWorkbench.exe doesn't work

Tried it again with more objects loaded in the DataManager and it works.

Event Timeline

Is it reproducible with that segmentation? Can you provide the file by either drag & drop it into a comment here or by copying it to a network drive and tell its location in this task if the segmentation is kind of private? - Thanks!

E130-Projekte\BGLU\Fibula\Hellena\Left\SegmTibia\AA246L Tibia.nrrd

Multilabel Plugin was switched off

Just tried it again in release 2016.11
randomly works or not

kalali added a subscriber: kalali.Jul 21 2017, 1:26 PM

On some Windows systems it only crashes if plugin multilabel is switched on & open or no plugin is open.
If plugin segmentation is open it works fine. On Linux it even happens if the segmentation plugin is open.

The crash occurs in function ShowSegmentationAsSmoothedSurface, because the geometry there ends up being a nullptr.
This function is called by QmitkCreatePolygonModelAction::Run in plugin Multilabel.
Apparently, both segmentation and multilabel segmentation have a QmitkCreatePolygonModelAction. It seems to be rather random which of the two actions is triggered when you select "Create smooth polygon model" in the datamanager.

The difference between both actions is that the segmentation one uses "ShowSegmentationAsSurface" whereas multilabel uses "ShowSegmentationAsSmoothedSurface".
Both functions basically offer the same functionality as well so everything could be realized within one class only.
ShowSegmentationAsSmoothedSurface might have been intended to be used for multilabel but does not handle any multilabel related actions at this point.
Therefor the best way might be to remove the ShowSegmentationAsSmoothedSurface and use ShowSegmentationAsSurface for both cases.
With this change there is no crash but in case of multilabel it stacks single labels into one big surface.

thomass claimed this task.Aug 4 2017, 9:57 AM
thomass added a project: Restricted Project.Aug 4 2017, 10:40 AM

Creating smoothed polygons now works for segmentation and multilabel without causing any crashes. However, no multilabel support is provided yet. The next step will be to cover multilabel support in QmitkCreatePolygonModelAction or rethink the structure as such (i.e. why we can't create a surface without segmentation or why the action is triggered randomly).
Furthermore, we removed ShowSegmentationAsSmoothedSurface from both, segmentation and multilabel. We have to further investigate why the class was created in first place and if there is any advantage of the ITK implementation used in this class as opposed to the VTK driven implementation in mitkManualSegmentationToSurfaceFilter.

kislinsk closed this task as Resolved.Jan 19 2018, 9:55 AM

The original issue seems to be fixed. Therefore and because of inactivity I close this task as resolved.