Medical Imaging Interaction Toolkit
2023.04.00
Medical Imaging Interaction Toolkit
|
In addition to Step 4 where 3 views were created on the data, we now want to interactively add points.
A node containing a PointSet as data is added to the data tree and a PointSetDataInteractor is associated with the node, which handles the interaction. The interaction pattern is defined in a state-machine, stored in an external XML file. Thus, we need to load a state-machine.
A state machine describes interaction pattern with different states (states beeing something like "a point is selected") and transitions to these states (e.g. "select a point"). These transitions are associated with actions. In this way it is possible to model complex interaction schemes. By what these transitions and actions are triggered is described in a configuration file. It maps user events to identifiers that are used in the state machine patterns. In this way the user interaction can be changed by simply loading a different configuration file for a state machine, and the user may add points now with a right click instead of left click + SHIFT, as in our case.
Therefore after loading the state machine pattern the PointSetDataInteractor is also given a event configuration file.
More information about interaction in MITK can be found here.
In order to add a point the shift key has to be pressed while left clicking in a render window. You can also move points or remove them (left click while pressing ALT).
A PointSet and a node for it have to be created to be able to interactively adding points: