vtkSeedWidget

Section: Visualization Toolkit Widget Classes

Usage

The vtkSeedWidget is used to placed multiple seed points in the scene. The seed points can be used for operations like connectivity, segmentation, and region growing. To use this widget, specify an instance of vtkSeedWidget and a representation (a subclass of vtkSeedRepresentation). The widget is implemented using multiple instances of vtkHandleWidget which can be used to position the seed points (after they are initially placed). The representations for these handle widgets are provided by the vtkSeedRepresentation.

.SECTION Event Bindings By default, the widget responds to the following VTK events (i.e., it watches the vtkRenderWindowInteractor for these events): <pre> LeftButtonPressEvent - add a point or select a handle (i.e., seed) RightButtonPressEvent - finish adding the seeds MouseMoveEvent - move a handle (i.e., seed) LeftButtonReleaseEvent - release the selected handle (seed) </pre>

Note that the event bindings described above can be changed using this class's vtkWidgetEventTranslator. This class translates VTK events into the vtkSeedWidget's widget events: <pre> vtkWidgetEvent::AddPoint -- add one point; depending on the state it may the first or second point added. Or, if near handle, select handle. vtkWidgetEvent::Completed -- finished adding seeds. vtkWidgetEvent::Move -- move the second point or handle depending on the state. vtkWidgetEvent::EndSelect -- the handle manipulation process has completed. </pre>

This widget invokes the following VTK events on itself (which observers can listen for): <pre> vtkCommand::StartInteractionEvent (beginning to interact) vtkCommand::EndInteractionEvent (completing interaction) vtkCommand::InteractionEvent (moving after selecting something) vtkCommand::PlacePointEvent (after point is positioned; call data includes handle id (0,1)) </pre>

To create an instance of class vtkSeedWidget, simply invoke its constructor as follows

  obj = vtkSeedWidget

Methods

The class vtkSeedWidget has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj is an instance of the vtkSeedWidget class.