Page MenuHomePhabricator

Interactors
Closed, WontfixPublic

Assigned To
None
Authored By
xplanes
Jan 22 2010, 9:23 AM
Referenced Files
F436: bug3252_1.diff
Mar 25 2010, 3:07 PM
F435: bug3252.diff
Jan 25 2010, 10:37 AM
F434: bug3252.diff
Jan 22 2010, 9:32 AM
F433: bug3252.diff
Jan 22 2010, 9:24 AM

Description

Added mitk::SlicesRotatorMovement interactor class and the state machine "slices-rotator-and-movement": Extended slices-rotator interactor with three states: rotate, move and translate depending on the position of the mouse pointer relative to the axis. Added SHIFT event to hide/show the cursor when shift is pressed

Use case 1:

  1. mitk::PointSetInteractor is created with a limit of 3 maximum points and a 3D+T mitk::PointSet with 3 time steps.
  2. Interactor is added to mitk::GlobalInteraction.
  3. The user adds 3 points to the time step 0 and the state is "set full"
  4. Time step is changed to time step 1
  5. The state of the interactor needs to be updated to "space left"

Added an observer of the current time step in QmitkStdMultiWidget because it creates the m_TimeNavigationController. The callback function calls mitk::GlobalInteraction to update all listeners. Added mitk::StateMachine::OnTimeStepChanged( ) to update the state depending on the current time step. Also added the state machine "pointsetinteractorWithTime" to be able to manage this events.

Use case 2:

  1. mitk::SlicesRotatorMovement is added to GlobalInteraction
  2. mouse pointer is over the axis and the rotate icon is shown
  3. A short-cut key is pressed to disable the interactor
  4. The state of the intarctor needs to be updated when the interactor is removed from GlobalInteraction and the mouse icon should be reset to default
  5. When the interactor is added again to GlobalInteraction, the mouse icon needs to be updated again

Added the function mitk::StateMachine::Enable( ) to send enable or disable event to the state machine when this is added or removed from GlobalInteraction instance.

Added other events: wheel MouseButton, A, Z keys.

Event Timeline

xplanes added a subscriber: xplanes.

Unified patch

Sorry, I made a mistake sending the previous one. This is the correct one

Removed observer of time stepper by QmitkStdMultiWidget and moved it to mitk::Interactor::HandleEvent( ). Call mitk::StateMachine::Enable( ) when the interactor is added or removed from GlobaInteraction.

Hi Xavier,

thanks for this contribution. This is a big change, could you try to explain what it provides and how it can be used? There is also changes in the QmitkRenderWindow and in the StdMultiWidget. Is your new interactor a equivalent replacement for the existing one or could this change be made configurable? We have to check this carefully for potential side effects.

Hi Marco,

The new interactor is mitk::SlicesRotatorMovement is an extension of mitk::SlicesRotator. The user can move and rotate the axis without the need of going to the menu to change the mode. Depending on the mouse pointer relative to the axis center, the user can see an icon showing what operation will be performed: move, translation or rotation.

When the user press SHIFT key to add a landmark using another interactor, the icon is hide and the axis are not changed.

The changes in QmitkRenderWindow and in the StdMultiWidget are very simple:

  • QmitkRenderWindow: added keyReleaseEvent(QKeyEvent *ke) function
  • StdMultiWidget: replace mitk::SlicesRotator by mitk::SlicesRotatorMovement. You can disable it if you want. Just to test it.

The other two changes: EIDTIMECHANGED and EIDENABLE are needed when using 3D+T landmarks and add/remove pointSet interactor to GlobalInteraction.

I can call you by phone if you think is needed.

Updated mitkSlicesRotatorMovement.h and mitkSlicesRotatorMovement.cpp. Now it works for any number of cut planes

files needing modification if patch is applied to current git HEAD:

Core/Code/Interactions/StateMachine.xml
Core/Code/Interactions/mitkGlobalInteraction.cpp
Core/Code/Interactions/mitkInteractionConst.h
Core/Code/Interactions/mitkInteractor.cpp
Core/Code/Interactions/mitkStateMachine.cpp
Core/Code/Interactions/mitkStateMachine.h
Core/Code/files.cmake
CoreUI/Bundles/org.mitk.gui.qt.common/resources/StateMachine.xml
CoreUI/Qmitk/QmitkRenderWindow.cpp
CoreUI/Qmitk/QmitkRenderWindow.h
CoreUI/Qmitk/QmitkStdMultiWidget.cpp

conflicts in:
Core/Code/Interactions/StateMachine.xml.rej
Core/Code/Interactions/mitkInteractionConst.h.rej
Core/Code/Interactions/mitkStateMachine.cpp.rej
CoreUI/Bundles/org.mitk.gui.qt.common/resources/StateMachine.xml.rej

EventIds to be added in mitkInteractionConst.h:
EIDWHEELMOUSEBUTTONUP = 50, Wheel MouseButton Up
EIDWHEELMOUSEBUTTONDOWN = 51,
Wheel MouseButton Down

ActionIds to be added in mitkInteractionConst.h:
AcSINGLEAXISMOVEMENTSTART = 1013, Single axis movement start
AcSINGLEAXISMOVEMENTEND = 1014,
Single axis movement end
AcAXISCENTERMOVEMENTSTART = 1015,
AcAXISCENTERMOVEMENTEND = 1016,

because the id 1013 was already used for AcSCROLL the ids have been altered to AcSINGLEAXISMOVEMENTSTART = 1113, Single axis movement start
AcSINGLEAXISMOVEMENTEND = 1114,
Single axis movement end
AcAXISCENTERMOVEMENTSTART = 1115,
AcAXISCENTERMOVEMENTEND = 1116,

dont forget this in the statemachine.xml (still have to be edited)

opened topic branch bug-3252-interactors

pushed two more commits with fixes for changed APIs of
SlicesSwiveller: does not have the method ResetMouseCursor( NULL ) any more

mitk::ApplicationCursor: changed signature of PushCursor() and PopCursor()

ok code compiles: Next bugsquashing TODO: adapt the statemachine and test if everything works

Resetting all bugs without active assignee flag to "CONFIRMED". Change status to IN_PROGRESS if you are working on it.

resetting bug to confirmed since they are not currently in progress

closing bug.currently no more resources available for this feature request.interactor scheme will be anyway changed soon

kislinsk added a project: Bulk Edit.
kislinsk removed a project: Bulk Edit.