Page MenuHomePhabricator

Crosshair navigation not disabled in QmitkMeasurementView
Closed, ResolvedPublic

Description

While placing a line or any other planar figure using the QmitkMeasurementView the method DisableCrosshairNavigation() is called. However, when trying to get the DisplayInteractor using
'auto displayInteractor = dynamic_cast<mitk::DisplayInteractor*>(us::GetModuleContext()->GetService<mitk::InteractionEventObserver>(eventObserver));'
a nullptr is always returned, and the "DisplayConfigMITKLimited" is never set.

API-breaking changes

The DisplayConfigPACSBase.xml has been changed such that the alwaysReact parameter is now set to false (<param name="alwaysReact" value="false"/>).
This will change (and possibly break) expected behavior when using this display interaction configuration in conjunction with a data interactor (e.g. PlanarFigureInteractor: A specific mouse event will now only be handled by the data interactor and not be forwarded to the display interactor.
This is now in line with MITK-interaction configuration files, where the parameter was already set to false before.

Revisions and Commits

rMITK MITK
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision

Event Timeline

What version of MITK do you use? I cannot reproduce any trouble with the cross hair while placing planar figures.

I'm currently in develop branch (0d336d68).
What I meant to say is that, from what I see in QmitkMeasurementView, the crosshair navigation should be limited when placing a figure. However, the method QmitkMeasurementView::DisableCrosshairNavigation() fails to load the limited display interactor.

kislinsk claimed this task.

I see. The only implication however is that one is able to scroll through the slices while placing a planar figure while placing control points on different slices is prevented, so I would say this is more like a feature than a bug, as one can look up neighboring slices during placement to support the decision where to exactly place points.

kalali reopened this task as Open.EditedJul 19 2022, 7:52 PM
kalali claimed this task.
kalali added subscribers: s434n, kalali.

Just found this while working on T29234.
When @s434n and I were working on the interactions https://phabricator.mitk.org/D550?vs=on&id=2579 (and earlier the DisplayInteractor was replaced with DisplayInteractionEventBroadcast here https://phabricator.mitk.org/source/mitk/browse/develop/Modules/QtWidgets/src/QmitkAbstractMultiWidget.cpp$51-52) it seems as if this part of the code was forgotten.
The DisplayInteractor is not used anymore and that's why the retrieved object is a nullptr.

I looked a bit deeper into this and as @kislinsk said I couldn't spot any difference using the default MITK interaction. However, when changing the interaction mode to PACS the problem arises that e.g. moving a point on a planar figure also performs the PACS interaction, e.g. slicing or levelwindow adjusting.

I'll fix this here by changing the DisplayInteractor to DisplayInteractionEventBroadcast and using a different interaction configuration .xml-file (to get rid of this rarely used config-file).

Edit: Attention: respect T26485#226052 for PACS mode.

kalali added a revision: Restricted Differential Revision.Jul 19 2022, 7:53 PM
kalali added a project: Breaking Change.

The DisplayInteractor is not used anymore and that's why the retrieved object is a nullptr.

I looked a bit deeper into this and as @kislinsk said I couldn't spot any difference using the default MITK interaction. However, when changing the interaction mode to PACS the problem arises that e.g. moving a point on a planar figure also performs the PACS interaction, e.g. slicing or levelwindow adjusting.

I'll fix this here by changing the DisplayInteractor to DisplayInteractionEventBroadcast and using a different interaction configuration .xml-file (to get rid of this rarely used config-file).

The changing of the display interactor was completely removed in the measurement view as it was unnecessary in this case.

API-breaking changes

The DisplayConfigPACSBase.xml has been changed such that the alwaysReact parameter is now set to false (<param name="alwaysReact" value="false"/>).
This will change (and possibly break) expected behavior when using this display interaction configuration in conjunction with a data interactor (e.g. PlanarFigureInteractor: A specific mouse event will now only be handled by the data interactor and not be forwarded to the display interactor.
This is now in line with MITK-interaction configuration files, where the parameter was already set to false before.