Undo concept

From mitk.org
Revision as of 16:19, 1 June 2016 by JasminMetzger (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Undo is one of the important features of a good user interface in interactive applications. Without undo, correcting a false instruction is often time consuming. Undo and redo functionality is a fundamental design decision and cannot be easily added at a later time. Thus, MITK concepts offer undo and redo functionality for interaction and processing tasks.

MITK's general undo-/redo-concept is based on the inverse command strategy [1]. The concept requires the interaction objects to issue operations, which are send to operation actors that actually perform the operation, e.g., modify the data.

For each operation an associated inverse operation is created by the interaction object (e.g. move backward for move forward). Both packed together in an OperationCommand-object are send to an UndoController-object (see Fig. 1 on interaction concept page).

In case of an undo-command issued by the user by clicking the undo button in the application GUI, the UndoController sends the inverse operation to the operation actor. The inverse operation restores the previous status, or, in case of filter operations, the previous data or parameter set.

Different undo/redo models are possible, like a limited linear undo/redo-model or a linear instruction tree model. Currently, a restricted linear undo model is implemented [2]. The state machine concept outlined before facilitates the consistent realization of the undo/redo functionality of interactions.

For further reading see section Publication and the Doxygen generated documentation on MITK interaction.


References

[1] J. E. Archer Jr., R. Conway, and F. B. Schneider, User recovery and reversal in interactive systems, ACM Transactions on Programming Languages and Systems 6(1), pp. 119, 1984.

[2] T. Berlage, A selective undo mechanism for graphical user interfaces based on command objects, ACM Transactions on Computer-Human Interaction 1(3), pp. 269-294, 1994.