Hello All,<br><br>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.
<br><br> <br> vtkRenderer* ren1 = vtkRenderer::New();<br>
<br> vtkRenderWindow* renWin = vtkRenderWindow::New();<br> renWin->AddRenderer(ren1);<br>
<br> vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New();<br> iren->SetRenderWindow(renWin);<br><br> rbz = vtkInteractorStyleRubberBandZoom::New ();<br> rbz->SetInteractor (iren);<br><br>
vtkProperty* ipwProp = vtkProperty::New();<br><br> vtkImagePlaneWidget* ipw = vtkImagePlaneWidget::New();<br> ipw->SetInput(vtkReader->GetOutput());<br><br> ipw->DisplayTextOn();<br> ipw->SetInteractor(iren);
<br> ipw->SetKeyPressActivationValue('z');<br> ipw->SetTexturePlaneProperty(ipwProp);<br> ipw->TextureInterpolateOn();<br> ipw->SetResliceInterpolateToCubic();<br> ipw->SetPlaneOrientationToXAxes();
<br> ipw->SetSliceIndex(38);<br> ipw->DisplayTextOn();<br> ipw->On();<br><br> renWin->Render ();<br> iren->Initialize();<br>
iren->Start ();<br>
<br>