|
| virtual int | IsA (const char *type) |
| |
| vtkContourWidget * | NewInstance () const |
| |
| void | PrintSelf (ostream &os, vtkIndent indent) |
| |
| virtual void | SetEnabled (int) |
| |
| void | SetRepresentation (vtkContourRepresentation *r) |
| |
| vtkContourRepresentation * | GetContourRepresentation () |
| |
| void | CreateDefaultRepresentation () |
| |
| void | CloseLoop () |
| |
| virtual void | SetWidgetState (int) |
| |
| virtual int | GetWidgetState () |
| |
| void | SetAllowNodePicking (int) |
| |
| virtual int | GetAllowNodePicking () |
| |
| virtual void | AllowNodePickingOn () |
| |
| virtual void | AllowNodePickingOff () |
| |
| virtual void | SetFollowCursor (int) |
| |
| virtual int | GetFollowCursor () |
| |
| virtual void | FollowCursorOn () |
| |
| virtual void | FollowCursorOff () |
| |
| virtual void | SetContinuousDraw (int) |
| |
| virtual int | GetContinuousDraw () |
| |
| virtual void | ContinuousDrawOn () |
| |
| virtual void | ContinuousDrawOff () |
| |
| virtual void | Initialize (vtkPolyData *poly, int state=1, vtkIdList *idList=NULL) |
| |
| virtual void | Initialize () |
| |
| vtkAbstractWidget * | NewInstance () const |
| |
| virtual void | SetProcessEvents (int) |
| |
| virtual int | GetProcessEvents () |
| |
| virtual void | ProcessEventsOn () |
| |
| virtual void | ProcessEventsOff () |
| |
| vtkWidgetEventTranslator * | GetEventTranslator () |
| |
| void | Render () |
| |
| void | SetParent (vtkAbstractWidget *parent) |
| |
| virtual vtkAbstractWidget * | GetParent () |
| |
| vtkWidgetRepresentation * | GetRepresentation () |
| |
| virtual void | SetManagesCursor (int) |
| |
| virtual int | GetManagesCursor () |
| |
| virtual void | ManagesCursorOn () |
| |
| virtual void | ManagesCursorOff () |
| |
| virtual void | SetPriority (float) |
| |
| vtkInteractorObserver * | NewInstance () const |
| |
| void | PrintSelf (ostream &os, vtkIndent indent) |
| |
| int | GetEnabled () |
| |
| void | EnabledOn () |
| |
| void | EnabledOff () |
| |
| void | On () |
| |
| void | Off () |
| |
| virtual void | SetInteractor (vtkRenderWindowInteractor *iren) |
| |
| virtual vtkRenderWindowInteractor * | GetInteractor () |
| |
| virtual float | GetPriority () |
| |
| virtual void | PickingManagedOn () |
| |
| virtual void | PickingManagedOff () |
| |
| virtual void | SetPickingManaged (bool) |
| |
| virtual bool | GetPickingManaged () |
| |
| virtual void | SetKeyPressActivation (int) |
| |
| virtual int | GetKeyPressActivation () |
| |
| virtual void | KeyPressActivationOn () |
| |
| virtual void | KeyPressActivationOff () |
| |
| virtual void | SetKeyPressActivationValue (char) |
| |
| virtual char | GetKeyPressActivationValue () |
| |
| virtual vtkRenderer * | GetDefaultRenderer () |
| |
| virtual void | SetDefaultRenderer (vtkRenderer *) |
| |
| virtual vtkRenderer * | GetCurrentRenderer () |
| |
| virtual void | SetCurrentRenderer (vtkRenderer *) |
| |
| virtual void | OnChar () |
| |
| void | GrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
| |
| void | ReleaseFocus () |
| |
| vtkObject * | NewInstance () const |
| |
| virtual void | DebugOn () |
| |
| virtual void | DebugOff () |
| |
| bool | GetDebug () |
| |
| void | SetDebug (bool debugFlag) |
| |
| virtual void | Modified () |
| |
| virtual unsigned long | GetMTime () |
| |
| unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
| |
| unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
| |
| vtkCommand * | GetCommand (unsigned long tag) |
| |
| void | RemoveObserver (vtkCommand *) |
| |
| void | RemoveObservers (unsigned long event, vtkCommand *) |
| |
| void | RemoveObservers (const char *event, vtkCommand *) |
| |
| int | HasObserver (unsigned long event, vtkCommand *) |
| |
| int | HasObserver (const char *event, vtkCommand *) |
| |
| void | RemoveObserver (unsigned long tag) |
| |
| void | RemoveObservers (unsigned long event) |
| |
| void | RemoveObservers (const char *event) |
| |
| void | RemoveAllObservers () |
| |
| int | HasObserver (unsigned long event) |
| |
| int | HasObserver (const char *event) |
| |
| template<class U , class T > |
| unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
| |
| template<class U , class T > |
| unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
| |
| template<class U , class T > |
| unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
| |
| int | InvokeEvent (unsigned long event, void *callData) |
| |
| int | InvokeEvent (const char *event, void *callData) |
| |
| int | InvokeEvent (unsigned long event) |
| |
| int | InvokeEvent (const char *event) |
| |
| const char * | GetClassName () const |
| |
| virtual void | Delete () |
| |
| virtual void | FastDelete () |
| |
| void | Print (ostream &os) |
| |
| virtual void | PrintHeader (ostream &os, vtkIndent indent) |
| |
| virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
| |
| virtual void | Register (vtkObjectBase *o) |
| |
| virtual void | UnRegister (vtkObjectBase *o) |
| |
| int | GetReferenceCount () |
| |
| void | SetReferenceCount (int) |
| |
| void | PrintRevisions (ostream &) |
| |
create a contour with a set of points
The vtkContourWidget is used to select a set of points, and draw lines between these points. The contour may be opened or closed, depending on how the last point is added. The widget handles all processing of widget events (that are triggered by VTK events). The vtkContourRepresentation is responsible for all placement of the points, calculation of the lines, and contour manipulation. This is done through two main helper classes: vtkPointPlacer and vtkContourLineInterpolator. The representation is also responsible for drawing the points and lines.
- Event Bindings:
- By default, the widget responds to the following VTK events (i.e., it watches the vtkRenderWindowInteractor for these events):
LeftButtonPressEvent - triggers a Select event
RightButtonPressEvent - triggers a AddFinalPoint event
MouseMoveEvent - triggers a Move event
LeftButtonReleaseEvent - triggers an EndSelect event
Delete key event - triggers a Delete event
Shift + Delete key event - triggers a Reset event
- Event Bindings:
- Note that the event bindings described above can be changed using this class's vtkWidgetEventTranslator. This class translates VTK events into the vtkContourWidget's widget events:
vtkWidgetEvent::Select
widget state is:
Start or
Define: If we already have at least 2 nodes, test
whether the current (X,Y) location is near an existing
node. If so, close the contour and change to Manipulate
state. Otherwise, attempt to add a node at this (X,Y)
location.
Manipulate: If this (X,Y) location activates a node, then
set the current operation to Translate. Otherwise, if
this location is near the contour, attempt to add a
new node on the contour at this (X,Y) location.
- Event Bindings:
vtkWidgetEvent::AddFinalPoint
widget state is:
Start: Do nothing.
Define: If we already have at least 2 nodes, test
whether the current (X,Y) location is near an existing
node. If so, close the contour and change to Manipulate
state. Otherwise, attempt to add a node at this (X,Y)
location. If we do, then leave the contour open and
change to Manipulate state.
Manipulate: Do nothing.
- Event Bindings:
vtkWidgetEvent::Move
widget state is:
Start or
Define: Do nothing.
Manipulate: If our operation is Translate, then invoke
WidgetInteraction() on the representation. If our
operation is Inactive, then just attempt to activate
a node at this (X,Y) location.
- Event Bindings:
vtkWidgetEvent::EndSelect
widget state is:
Start or
Define: Do nothing.
Manipulate: If our operation is not Inactive, set it to
Inactive.
- Event Bindings:
vtkWidgetEvent::Delete
widget state is:
Start: Do nothing.
Define: Remove the last point on the contour.
Manipulate: Attempt to activate a node at (X,Y). If
we do activate a node, delete it. If we now
have less than 3 nodes, go back to Define state.
- Event Bindings:
vtkWidgetEvent::Reset
widget state is:
Start: Do nothing.
Define: Remove all points and line segments of the contour.
Essentially calls Initialize(NULL)
Manipulate: Do nothing.
- Event Bindings:
- This widget invokes the following VTK events on itself (which observers can listen for):
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))
vtkCommand::WidgetValueChangedEvent (Invoked when the contour is closed
for the first time. )
- See also
- vtkHandleWidget
- Events:
- vtkCommand::StartInteractionEvent vtkCommand::InteractionEvent vtkCommand::EndInteractionEvent
- Tests:
- vtkContourWidget (Tests)
Definition at line 138 of file vtkContourWidget.h.