How to a customise vtkWidgetEvent?

classic Classic list List threaded Threaded
2 messages Options
ran
Reply | Threaded
Open this post in threaded view
|

How to a customise vtkWidgetEvent?

ran
Hi all,
I'm using vtkLineWidget2 for drawing lines over an image in
vtkResliceImageViewer2. Current behavior of vtkLineWidget2  on
LeftMouseButtonPress + Mousemove is transulation but i need I need to
customize the behavior on event over the line. I tried to set
lineWidget2->GetEventTranslator()->SetTranslation, but it only accept
vtkWidgetEvent which already defined.
I also tried to  lineWidget2->GetEventTranslator()->RemoveTranslation, and
to customize in my observer call back method, but then the event is not
recognized by the callback and is transferring parent render window(which is
vtkResliceImageViewer2) interactor style. In this case, I can't find whether
the event is happening in vtkLineWidget2.

Can I add a custom vtkWidgetEvent in to customize the behavior
vtkLineWidget2?
or can disable the action of an event(for eg translation action on
LeftMouseButtonPress + Mousemove) with retaining observer event?



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: How to a customise vtkWidgetEvent?

pnt1614
I have not tested yet but I think the following example can give you a hint
about disabling or removing an event.

https://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Interaction/Widgets/Testing/Cxx/TestContourWidget2.cxx



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers