Page MenuHomePhabricator

[Segmentation] Remove plugin redundancy with MultiLabelSegmentation
Closed, ResolvedPublic

Description

MITK offers two fundamental plugins, the org.mitk.gui.qt.segmentation-plugin and the org.mitk.gui.qt.multilabelsegmentation-plugin.
Both plugins provide two views, one for the segmentation-functionality (tools etc.) and one for the utilities. Both also provide a definition of a properties page. A lot of the code inside the multilabelsegmentation-plugin was just copied from the segmentation-plugin.
The multilabelsegmentation-plugin also uses many UI-elements from the SegmentationUI-module.

Maintaining two plugins that are similar reveals a faulty design decision. We already experience to do twice the work to get both plugins working. I suggest to discuss this, talk about the (dis-)advantages and define next steps to remove code redundancy for these two plugins.

It might make sense to also keep {T23602}, {T26506}, T27807: [MultiLabel Segmentation] Inspection of module and plugin and T28118: Refactoring of SegTool2D in mind.

This tasks addresses the redundancy removal of the views for the segmentation tools. For removing the redundancy of the utilities view, see T28936: [Segmentation] Remove utilities redundancy with MultiLabelSegmentation.

Revisions and Commits

rMITK MITK
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

@kalali Aren't you already working on that topic? I thought, i just reviewed something in that direction?!?

@kalali Aren't you already working on that topic? I thought, i just reviewed something in that direction?!?

Not that I'm aware of :)
However, together with @kleina, @s434n and @a178n we will now find a way to work on that issue in parallel.

oops, sorry. than I have mixed something up.

I refactored both views massively. What I did was to somehow bring both plugins in line with each other to see the differences and the similarities. This simplifies to understand how things are implemented and what needs to be done to remove redundancy. I will highlight some points that I find striking:

  • the multilabel plugin view did not compare the world geometry to the selected segmentation node
    • I was able to draw a mask which was then positioned somewhere else (jumped) because of this (e.g. using brain.nrrd)
  • hiding the selected segmentation node disables the tools for the segmentation plugin but not for the multilabel segmentation plugin
  • the auto selection mode for showing / hiding the selected / not selected nodes in the data manager / render windows if the node selection is changed does not work anymore for the segmentation plugin (was already mentioned in T28256: [Segmentation] Auto-selection preference was hijacked for something else)
  • the multilabel segmentation plugin did not listen to render window part changes (no subclass of IRenderWindowPartListener)
  • the multilabel segmentation plugin lists some segmentation tools that don't even exist (FastMarching2D, Two Thresholds Auto Threshold Multiple Otsu)
  • the multilabel segmentation view plugin is not able to accept binary images as a segmentation
kalali moved this task from Segmentation to Cycle on the MITK (v2021.10) board.
kalali added a revision: Restricted Differential Revision.

Since we are now in the "final" release phase I suggest to use the corresponding checklists to check the new / modified behavior of D533 and simultaneously verify the checklists and test the UI behavior of both segmentation plugin views.

Since we are now in the "final" release phase I suggest to use the corresponding checklists to check the new / modified behavior of D533 and simultaneously verify the checklists and test the UI behavior of both segmentation plugin views.

+1

kalali lowered the priority of this task from Unbreak Now! to High.Oct 15 2021, 2:03 PM
kalali edited projects, added MITK, Next Milestone; removed MITK (v2021.10).

The changes have already been merged. If there are no critical bugs found since the last release (where the changes of the related D533 were already included) we can continue with this task / subtasks.
I'd like to discuss our goals concerning this task for MITK v2022.04.

Because of T27319: [Segmentation] Correctly implement interpolation features for Multilabel Segmentation View I disabled the interpolation if a labelsetimage is selected as the working node with more than 1 label (actually more than 2 labels: exterior + first label).

Other than that everything else seems to work as expected. I removed all of the duplicate MultiLabel segmentation stuff and merged the relevant things with the classic segmentation plugin view.
The differential is now online and we can use the upcoming release test phase to check the functionality of the now merged segmentation plugin view.

Segmentation utilities still exists in two forms, in the classic segmentation plugin and in the multilabel segmentation plugin.

kalali added a revision: Restricted Differential Revision.Feb 25 2022, 10:48 PM