Diffusion MITK dc6e037fc738

First refactoring of both the QmitkSegmentationView and the…


First refactoring of both the QmitkSegmentationView and the QmitkMultiLabelSegmentationView

The intention is to clean both classes and align the code in a way that allows to easily compare both plugin views.
This will simplify the "merge"-process to remove the plugin redundancy in the next step.

This differential was created to allow others to test the
Workbench-functionality of both modified plugin views.

Clean up unnecessary includes and comments

Clean and match node predicates

Match tools and initialization

Modernize and clean code

Remove unused function

Store tool manager instance as member variable

This avoids repeated retrieval of the tool manager singleton instance.

Move empty function definition to header

Clean classes

Remove unnecessary functions / member variables, remove comments,
modify strings and format / clean code.

Remove base class inheritance

The multilabel segmentation view does not need to be lifecycle aware.
The functionality was not implemented / is not required.

Remove functions for tool deactivation / tab widget changes

Changing the tab widget automatically disables the currently active tool.

Make QmitkMultiLabelSegmentationView be a subclass of IRenderWindowPartListener

This requires RenderWindowPartActivated / RenderWindowPartDeactivated to be implemented.
These functions were implemented before but did not react on render window parts being
activated / deactivated.

Align data selection and perform selection validation for both plugins.

Selection validation was not performed thoroughly - especially no
geometry comparison.
Pop-up dialogs have now been replaced with a warning label.
Warning messages are not scattered around the code anymore.
Qt ui-files have been cleaned and simplified.

Align functions to react on node events and changed preferences

Multilabel segmentation view did not react on newly added nodes.
Added dedicated function for applying node preferences.

Extend destructor to correctly remove observer

Test Plan: manual

Reviewers: kleina, s434n, O1 MITK Reviewer Group I, floca

Reviewed By: O1 MITK Reviewer Group I, floca

Subscribers: floca, kalali

Maniphest Tasks: T28142

Differential Revision: https://phabricator.mitk.org/D533


kalaliAuthored on Oct 15 2021, 1:47 PM
kislinskCommitted on Oct 15 2021, 1:47 PM
kislinskPushed on Oct 15 2021, 1:47 PM
O1: MITK Reviewer Group I
Differential Revision
Restricted Differential Revision
rMITK234cb93299fe: Fixed T28667 Generalize overwriting of interaction configs when using tools
T28142: [Segmentation] Remove plugin redundancy with MultiLabelSegmentation