Page MenuHomePhabricator

Redesign of Interaction-Statemachine
Closed, ResolvedPublic

Description

Redesign Interaction Framework

  • splitting up statemachine xml
  • configuration of input events
  • support towards multitouch
  • clear/deterministic event handling process

Event Timeline

New remote branch pushed: bug-13664-META-RedesignInteractionStateMachine

Current Progress:

MousePressEvent

  • Can be instantiated and compared
  • is tested in mitkInteractionEventTest

(should work, can be reviewed)

With BaseRenderer, BindDispatcherInteractor and Dispatcher are initiliazied,
Dispatcher receives message when a DataNode with Interactor is added to DataStorage.
Is tested in mitkDispatcherTest.
Adding of EventInteractor still fails due to casting problems.

Could you please write a short summary at http://mitk.org/wiki/ChangeRequests/13664 before requesting the Needs_Core_Modification flag? You can refer to the German summary, but at least the major change should be outlined in English

Progess Update:

Events:
implemented all Events (Mouse + Keyboard)

Dispatcher:

  • is now initialized and connected with DataStorage-Events.

Interactors can be registered and removed, DataNodes of Interactors can be switched.

  • Tests written.

XML Reader:

  • reimplemented States, Transitions, Actions and XML Parser

is still in progess and NOT yet tested.

(In reply to comment #3)

Could you please write a short summary at
http://mitk.org/wiki/ChangeRequests/13664 before requesting the
Needs_Core_Modification flag? You can refer to the German summary, but at
least the major change should be outlined in English

Since this will be anyway only merged after the 2012-12 release, I suggest to write an English summary page for the MITK webpage (including migration plan etc.) and reference this in the ChangeRequest.

Adapted Code according to Code Review.
Added StateMachine Config Object and Event Factory Class.

Progess Update.

Current implementation comprises:

  • Creation of Events (1st, converting from qt in qmitkrenderwindow, 2nd in an event object factory from an xml file)
  • Setting up a Dispatcher, connecting it to a RenderWindow and a binding it with DataStorage Events.
  • StateMachine (incl. Actions,Transitions, ..., creating object from xml file)
  • EventConfigObject, mapping from a specific event to a variant name provided by the xml definition

(here missing/ToDo: convinient providing file path, including xmls in compilations )

Basic implementation of a DataInteractor:
can be registered and receive events and change states/execute actions accordingly.

  • Tests for all the above.

Current work:
created a plugin with a _very_ basic interactor in order to (continously)
a) test the interaction of the above components
b) further delevlop the basic implementation of the datainteractor object
c) create an example interactor that uses all possible features

New remote branch pushed: bug-13664-RedesignInteraction-Integration

New remote branch pushed: bug-13664-RedesignInteraction-Integration-2

[a4d4bb]: Merge branch 'bug-13664-RedesignInteraction-Integration-2'

Merged commits:

2013-02-11 13:11:10 Christian Weber [45ee66]
Code Review broke Event comparison
fixed.


2013-02-11 11:16:04 Christian Weber [a9964b]
Merge branch 'bug-13664-RedesignInteraction-Integration'


2013-02-11 10:48:57 Christian Weber [79351a]
Init members
Error output


2013-02-08 20:05:34 Christian Weber [03968f]
diverged StateMachines again,
cause merging introduced doubled statemachine patterns


2013-02-08 19:28:06 Christian Weber [714fa9]
Fixed broken InformerAcceptance
removed Debug outputs


2013-02-08 16:55:05 Christian Weber [414d7f]
Included changes from second review


2013-02-08 09:41:03 Christian Weber [d2f357]
Merge branch 'bug-13664-META-RedesignInteractionStateMachine' into bug-13664-RedesignInteraction-Integration


2013-02-08 09:40:27 Christian Weber [da380c]
del comment


2013-02-07 15:46:26 Christian Weber [58ace2]
Tutorial finalized
Added Key Events
Some merging in StateMachines


2013-02-07 15:11:01 Daniel Maleike [c433b8]
Quite some formatting and simplification changes

Conflicts:

Core/Code/Interactions/mitkDisplayVectorInteractor.cpp
Core/Code/Interactions/mitkDisplayVectorInteractor.h
Core/Code/Interactions/mitkEventConfig.cpp
Core/Code/Interactions/mitkInteractionPositionEvent.cpp


2013-02-07 12:01:42 Christian Weber [4adb6e]
Merge branch 'bug-13664-META-RedesignInteractionStateMachine' into bug-13664-RedesignInteraction-Integration

Conflicts:
Core/Code/Resources/Interactions/Legacy/StateMachine.xml
Examples/Tutorial/Step10.cpp


2013-02-07 11:34:39 Christian Weber [8fabf0]
minor clean ups


2013-02-06 10:07:10 Christian Weber [6f4788]
Reset Docu


2013-02-06 09:36:31 Christian Weber [e4ef5c]
Fix invalid iterator / Docu chngs


2013-02-05 17:23:02 Christian Weber [2deafc]
Docu PointSetInteractor
Docu extended, merged into Tutorial


2013-02-05 13:40:44 Christian Weber [6afc0b]
Refactor isEqual to MatchTeplate
Use Resources to load Statemachine, changed their location so no one can find them anymore
and fiddle with them

Little Documentation extension


2013-02-04 17:38:31 Christian Weber [a38d6c]
Some changes to QtFreeRenderWindow to make it not crash with new Interaction
No mapping for internal events


2013-02-04 11:28:51 Christian Weber [f179dd]
Migrated MouseModeSwitcher to new Interaction


2013-02-01 11:31:02 Christian Weber [9fe19c]
MouseModeSwitcher Configurations
Integrated Level Window

Missing: implement switching between modes
PACS = combination of two confi files


2013-01-30 18:35:04 Christian Weber [b419a0]
Finalized Resources via ms


2013-01-30 09:57:01 Christian Weber [951ccc]
Start of Resource Integration


2013-01-29 17:00:43 Christian Weber [d29c62]
Merge remote-tracking branch 'origin/bug-14355-embedding-resources-in-modules' into bug-13664-META-RedesignInteractionStateMachine


2013-01-29 16:35:02 Christian Weber [e08dbd]
Documentation Revised
Added how to integrate new events


2013-01-29 14:41:15 Christian Weber [51c1b5]
added toUpperCase for more sm pattern robustness,
changed ScrollDirection property
added How to for new Events
absolutely minor docu tweaks


2013-01-29 09:45:27 Christian Weber [cba01f]
Merge remote-tracking branch 'origin/bug-14355-embedding-resources-in-modules' into bug-13664-META-RedesignInteractionStateMachine


2013-01-28 11:43:34 Christian Weber [86d0b7]
Add Warning if not state state is supplied in sm pattern


2013-01-28 09:35:53 Christian Weber [52c4bf]
Migrated DisplayInteraction: Move and Zoom Interactor


2013-01-25 18:47:30 Christian Weber [f8eee2]
Fixed Translation of MousePositions, Extended EventObserver by SM capability, Migration of MouseModeSwitcher started


2013-01-25 12:55:44 Christian Weber [7afbcd]
Changed vtkEventProvider to generate new InteractionEvents


2013-01-24 15:37:50 Christian Weber [d85be5]
Added isHandeled information for observer,
extended Docu


2013-01-24 10:51:38 Christian Weber [73971a]
Replace doubled Interaction Events, with last loaded version


2013-01-23 10:58:15 Christian Weber [c5edeb]
Adapted MouseEvents to match SM pattern description


2013-01-23 10:22:27 Christian Weber [97bb81]
Added polymorphie support on state machine level


2013-01-22 16:32:30 Christian Weber [4407a2]
Finish PointSet Interactor, Implement Filter for Event on SM Level


2013-01-22 13:24:15 Christian Weber [33107f]
Merge branch 'master' into bug-13664-META-RedesignInteractionStateMachine


2013-01-22 13:23:47 Christian Weber [0350ec]
Merge Chaos resolved


2013-01-22 13:05:22 Christian Weber [4e2f11]
Extended Docu, Extended PointSetInteractor


2013-01-22 13:01:12 Christian Weber [91d49b]
test ws


2013-01-19 20:44:17 Christian Weber [0effc8]
Extended PointSetInteractor, Extended Dispatcher by DataNodeModifier functionality


2013-01-19 20:43:34 Christian Weber [825be2]
Extended PointSetInteractor, Extended Dispatcher by DataNodeModifier functionality


2013-01-18 17:32:10 Christian Weber [98dce2]
Start: Mirgration of PointSetInteractor


2013-01-18 16:26:43 Christian Weber [7e2f3b]
Extended Docu, Sample DataInteractor


2013-01-18 13:52:35 Christian Weber [78005c]
Extend Docu, add Images


2013-01-17 17:52:43 Christian Weber [4bc830]
extended docu


2013-01-17 15:37:52 Christian Weber [17a352]
Extend Doxumentation
const'ing special KeyEvents


2013-01-17 12:48:37 Christian Weber [38c3c8]
First Documentation, Concept Page


2013-01-14 15:24:03 Christian Weber [3e4035]
Extended Sample Interactor, GrabInout Mode, Switch Config on runtime


2013-01-14 15:22:10 Christian Weber [943e4b]
Fix Coordinate Calculation in 3D RenderWindow case


2013-01-11 16:33:21 Christian Weber [84a031]
Fix Crash when StateMachine file is unavailable
Minor changes


2013-01-10 16:53:20 Christian Weber [486ae4]
Integrated EventObserver
Implemented MicroService to Notify all EventObservers about Events
Intergrated Service in Dispatcher and Example Interactor


2013-01-08 14:24:39 Christian Weber [bace69]
minor clean up


2013-01-08 10:34:20 Christian Weber [94885a]
Various Bug Fixes

Crash due to unregistered Observers in DataStorage (when re-registering)
Fixed sorting of DataInteractors in Dispatcher
Fixed Key Events to support special Keys
Added Target Parameter to InternalEvents


2013-01-04 16:32:47 Christian Weber [72da9c]
Added InternalEvents Processing
Implemented Dispatcher Modi
Extended SampleInteractor


2013-01-03 17:14:02 Christian Weber [6ec590]

  1. Implemented Combination of Mouse-Down ,Move , Release Cycles in Dispatcher
  2. GRAB_INPUT, PREFER_INPUT modes
  3. Internal Signals -

TODO Testing


2013-01-02 17:14:12 Christian Weber [858856]
First Simple Test - Interactor: Add/ Remove Points + RequestRenderUpdate


2013-01-02 15:38:18 Christian Weber [719397]
First Simple Test - Interactor: Add/ Remove Points


2012-12-17 17:46:07 Christian Weber [b21cf7]
Renaming, Refactor, Sample Interactor


2012-12-12 09:01:32 Christian Weber [4993d8]
Refactoring EventInteractor -> DataInteractor


2012-12-12 08:59:02 Christian Weber [f49905]
Refactoring EventInteractor -> DataInteractor


2012-12-11 17:16:17 Christian Weber [761235]
Config Object. Tests. StateMachine core functions implemented.


2012-12-07 17:23:21 Christian Weber [19fe30]
Implemented StateMachine Config and Event-Factory Class. Including a Test.


2012-12-06 11:19:06 Christian Weber [534724]
Modifications Code Review 1 Part Two


2012-12-04 22:00:39 Christian Weber [1a1945]
Modifications Code Review 1 Part One


2012-12-03 18:36:33 Christian Weber [e7ae59]
Statemachine Parser and Container fixed. Unit tests.


2012-12-03 10:44:57 Christian Weber [0d3df2]
Re-Implementation of States,Actions,Transitions and XML Parser [in progess]


2012-11-29 14:42:54 Christian Weber [0d1484]
Completed MouseEvents. Refactored EventConsts. Create Events from Qt Events and use Dummy-Dispatcher


2012-11-28 19:03:43 Christian Weber [e188c3]
Added Classes for MouseMove, MouseRelease. Updated Test. Changed to use Enums for ButtonState description


2012-11-28 18:05:29 Christian Weber [cfd4df]
Additional Dispatcher Test, fixed to handled NULL DatNodes


2012-11-28 11:17:25 Christian Weber [05f91b]
Fixed Registering Dispatcher, Handling double Adds and DataNode switches, working Unit-Test


2012-11-26 20:42:41 Christian Weber [4ffac9]
fix


2012-11-26 20:37:54 Christian Weber [5c43ec]
reworked InteractionEventTest and MousePressEvent class, Started Dispatcher Test


2012-11-26 18:54:30 Christian Weber [5c40bc]
mitk::MousePressEvent Class, Test for equality of InteractionEvents


2012-11-26 18:42:32 Christian Weber [e9334c]
Working MousePressEvent Class, Basic Test for mitkInteractionEvents


2012-11-24 02:26:31 Christian Weber [c1bfcc]
Start Testing, Event-Classes


2012-11-23 14:52:44 Christian Weber [eb8e54]
Instantiated/Integrated Dispatcher etc, Registerd for DataNode Events, DataNode Events are passed to proper Dispatcher


2012-11-23 13:26:22 Christian Weber [a95d32]
BindDispatcherInteractor, Dispatcher, EventInteractor Dummy-Classes


2012-11-22 18:19:43 Christian Weber [d2cfe8]
git ignore to include eclipse project settings


2012-11-22 18:00:12 Christian Weber [4fc92f]
EventHandler Class Hirarchy

New remote branch pushed: bug-13664-RedesignInteraction-Integration-3

[7952d9]: Merge branch 'bug-13664-RedesignInteraction-Integration-3'

Merged commits:

2013-02-11 14:17:15 Christian Weber [c01ef2]
COMP: initialize Point2D var in event factory

New remote branch pushed: bug-13664-RedesignInteraction-Integration-4

[6cdbde]: Merge branch 'bug-13664-RedesignInteraction-Integration-4'

Merged commits:

2013-02-13 18:16:58 Christian Weber [07a6df]
Changed Qt::MiddleButton to Qt::MidButton in order to retain compatibility with old qt version

As a side note, it would be preferable to re-use the original Git topic branch when adding new changes instead of creating new branches each time a modification is made.

[81ec45]: Merge branch 'bug-13664-RedesignInteraction-Integration-4'

Merged commits:

2013-02-21 09:48:32 Christian Weber [a1117a]
decprecated note


2013-02-20 15:37:13 Christian Weber [3962d2]
re implemented is superclassof etc


2013-02-19 19:03:07 Christian Weber [96ad9e]
Fix Observer registration .., removing obsolete registration calls


2013-02-19 14:53:59 Christian Weber [707ca5]
Refactoring


2013-02-18 18:13:05 Christian Weber [786ccb]
Reworked EventObserver to use us in proper way


2013-02-15 16:51:06 Christian Weber [109d04]
minor Docu fix


2013-02-15 16:39:40 Christian Weber [4753c5]
Code Review Changes Part 2,
MicroService Usage fix 1/2


2013-02-14 19:32:23 Christian Weber [2c2dee]
Some more code changes from review


2013-02-14 19:31:52 Christian Weber [400680]
Changes in XML event description


2013-02-14 13:26:35 Christian Weber [05f26f]
Added Deprecated markers

[9b41da]: Merge branch 'bug-13664-RedesignInteraction-Integration-4'

Merged commits:

2013-02-22 13:01:17 Christian Weber [7448a9]
COMP: fix inclusion of mitkEventObserver and QtFreeRenderer

[0581b1]: Merge branch 'bug-13664-RedesignInteraction-Integration-4'

Merged commits:

2013-02-22 13:27:18 Christian Weber [4ae077]
COMP: added missing include for mitkDispatcher in test

[50d3c3]: Merge branch 'bug-13664-RedesignInteraction-Integration-4'

Merged commits:

2013-02-22 14:59:56 Christian Weber [bc4269]
COMP: adapted loading for standard behavior of eventmapper to match the one for statemachines
added baserender.h uncost Dispatcher

[b82538]: Merge branch 'bug-13664-RedesignInteraction-Integration-4'

Merged commits:

2013-02-22 15:35:36 Christian Weber [09144a]
COMP: fix crash due to unregistered EventObserver

[5d3326]: Merge branch 'bug-13664-RedesignInteraction-Integration-4'

Merged commits:

2013-02-22 15:47:46 Christian Weber [8875eb]
COMP: forward declaration using struct.

[665c05]: Merge branch 'bug-13664-RedesignInteraction-Integration-4'

Merged commits:

2013-02-23 15:08:32 Christian Weber [8af925]
COMP: temp fix for doubled use of DEBUG

define of DEBUG in tinyxml inteferes with microservices use of DEBUG,
so for now DEBUG is set to DEBUG in windows debug builds.
(c) header needs revising.

[255510]: Merge branch 'bug-13664-RedesignInteraction-Integration-4'

Merged commits:

2013-03-12 14:54:04 Christian Weber [e9dcb2]
Fixed wrong MouseEvent call in legacy handling

[71d009]: Merge branch 'bug-13664-RedesignInteraction-Integration-4'

Merged commits:

2013-03-27 16:55:53 Christian Weber [27fe4f]
Adding a activated mode to the InteractionEventObserver class,
and disabling all observers while a tool is active.

New remote branch pushed: bug-13664-RedesignInteraction-Integration-5

[779562]: Merge branch 'bug-13664-RedesignInteraction-Integration-5'

Merged commits:

2013-03-28 10:55:45 Christian Weber [a01f80]
fix typo, indendation


2013-03-28 10:55:00 Christian Weber [53db60]
Merge branch 'bug-13664-RedesignInteraction-Integration-5' of mitk.org:MITK into bug-13664-RedesignInteraction-Integration-5


2013-03-28 10:50:57 Christian Weber [2c8dc4]
fix typo, add space bar


2013-03-28 10:49:55 Christian Weber [e2ee6c]
fix typo, add space bar


2013-03-28 10:45:10 Christian Weber [1d9384]
Let everything activated for our own release, but provide external devlopers the means
to easily deactivate whatever they want.


2013-03-28 10:04:13 Christian Weber [438374]
Merge branch 'bug-13664-RedesignInteraction-Integration-4' into bug-13664-RedesignInteraction-Integration-5


2013-03-28 09:30:39 Christian Weber [791ae9]
Load alternative Configuration for the display interactor, when a tool is activated

New remote branch pushed: bug-13664-code-review-changes

[2e9e1f]: Merge branch 'bug-13664-code-review-changes'

Merged commits:

2013-03-30 19:26:11 Sascha Zelzer [2d4c33]
Use the correct method to unregister DataInteractor from DataNode.


2013-03-30 19:25:42 Sascha Zelzer [90d8c3]
Fixed copy constructor for mitk::CameraIntrinsics.


2013-03-30 19:25:24 Sascha Zelzer [a499df]
Removed DEPRECATED macro again, since it leads to compile errors.

This was working previously, since -Werror / /WX was not working.


2013-03-30 17:59:26 Sascha Zelzer [6cc320]
Merge branch 'bug-14783-cmake-compiler-and-linker-flags' into bug-13664-code-review-changes


2013-03-30 16:10:21 Sascha Zelzer [3b550a]
Harmonized Set/Load/Add event config methods.

The EventConfig and InteractionEventHanlder classes now use the same
semantics for "Load" (removed), "Set" and "Add".

EventConfig objects can now also be retrieved and set, which allows
the ToolManager to remember the current config of a DisplayInteractor
when loading an alternative configuration.


2013-03-30 16:06:54 Sascha Zelzer [f8f0c0]
Removed GetEventClass() method, using GetNameOfClass() instead.


2013-03-30 00:01:50 Sascha Zelzer [0f2869]
Deprecated classes, added const and pass by reference, simplified inheritance.


2013-03-29 23:55:08 Sascha Zelzer [7d2f22]
Moved interaction event constants to DataInteractor and InteractionEvent.

Stripped mitkEventConfig.h from unnecessarily exported methods and
converted it to a class with value semantics.


2013-03-29 23:31:26 Sascha Zelzer [25c8bc]
Added proper clone methods for properties.


2013-03-29 22:34:25 Sascha Zelzer [a52e5d]
Improved equality methods using static casts.


2013-03-28 19:26:45 Sascha Zelzer [65863b]
Added deprecated macro for old Interactor class.


2013-03-28 19:26:18 Sascha Zelzer [357df3]
Moved test interaction xml files to the test driver.


2013-03-28 18:53:55 Sascha Zelzer [7a3277]
Use C++ style operator== for comparing interaction events.


2013-03-28 18:53:03 Sascha Zelzer [f7e74e]
Deprecated TActionFunctor and used mitk::Message instead.


2013-03-28 18:52:28 Sascha Zelzer [2773cc]
Added const modifiers and passing arguments by reference instead of value.

[36b3ba]: Merge branch 'bug-13664-code-review-changes'

Merged commits:

2013-03-30 21:26:31 Sascha Zelzer [ee98f0]
COMP: Fix example to use renamed method.

I have set the target milestone to 2013-03 and am closing this bug. I think the redesign is pretty much done and we should open new specific bug reports for missing features or bug reports.