Event Handling

In GoFigure2, the events and visualization gesture is based on the classes developed at INRIA, vtkRenderingAddOn2. The classes has been adapted to fit our requirements since we are processing biological data instead of medical images.

1. Overview

The interaction between the user and a window is based on 3 classes:


2. vtkViewImage

2.1. Class Overview

This class allows the user to display an image.

2.2. Tips to handle events

Add an observer to the current interactor style (vtkInteractorStyleImage). Choose the events we want to observe. Add the class to be called when the event occurs is vtkViewImageCommand.


3. vtkInteractorStyle

3.1. Class Overview

This class defines the behaviour of the interactor, i.e., which event should be sent when a specific action is performed by the user.

3.2. Tips to handle events

Reimplement an existing interactor. Don't forget to call the superclass if you want to add functionnalities to the original behaviour.


4. vtkViewImageCommad

4.1. Class Overview

This class defines what to do when a particular event has been caught.

4.2. Tips to handle events


5. Source code

The source code can be found at:


5. Example ΒΆ

It is implemented at: