[vtk-developers] vtkContourWidget events

dean.inglis at camris.ca dean.inglis at camris.ca
Thu Apr 19 16:44:37 EDT 2007


Hi,

I want to observe two of vtkContourWidget's events:

//   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. )

However, in the widget's two methods:
1)
AddNode(), wherein a check is made for a closed loop
and if so, the event EndInteractionEvent is
invoked instead of WidgetValueChangedEvent.
2) 
AddFinalPointAction(vtkAbstractWidget *w), wherein
NO event is invoked.

Should the documented events be invoked? There
does not appear to be a way to retrieve them with
any of the internal classes or vtkAbstractWidget.

It would be useful to have these events so that a GUI could
know when to enable buttons such as in a vtkKWContourEditor
(in development!) with Undo, Clear etc. functions.  Currently
I can only listen for EndInteraction events.

Since both PlacePointEvent and WidgetValueChangedEvent are
 in vtkCommand, can I add the appropriate InvokeEvent methods
to vtkContourWidget as required?

Dean



More information about the vtk-developers mailing list