[vtkusers] Question about vtkImagePlaneWidget and setting interactors

Dean Inglis dean.inglis at camris.ca
Thu Sep 7 10:54:09 EDT 2006


Hi,

that is an interesting observation.  vtkImagePlaneWidget (vtkIPW) was
designed to work with vtkInteractorStyleTrackBallCamera.  I can
appreciate that you want to zoom in with the other interactor style
though.  If you have a GUI interface to your code, you could
temporarily "freeze" the vtkIPW with
widget->InteractionOff();
then switch the interactor style from TrackBallCamera to RubberBandZoom
to do the zooming.

Dean


Hello All,

I found that if I put vtkImagePlaneWidget into a renderwindow, then the
default interactor style is JoystickCamera. I want to change this to be some
other style, say the RubberBandZoom.  I've listed my code below. When I run
this, I get a very weird thing. If I click inside the widget, then
everything works fine. When I click and hold the left mouse button outside
the widget, it rotates, just like it would with JoystickCamera.  When I move
the mouse, the widget continues to rotate, but I also see the white box that
RubberBandZoom creates.  So it's like both interactors are working at the
same time.  I just need the window to use one style (the RubberBandZoom),
not both.  Thank you in advance for your help.





More information about the vtkusers mailing list