I have two styles in my program: <br>1) vtkInteractorStyleImage and <br>2) Mouse and KeyPress interactor style. <br><br>Setting "SetInteractionModeToImageSlicing()" on the vtkInteractorStyleImage alone produces the result of what I want. However, adding the mouse and keypress style overrides the vtkInteractorStyleImage and introduces what looks like a 2D slice with rotation. I would like to disable that. Would have my mouse and keypress class inherit from both vtkInteractorStyleTrackballCamera and vtkInteractorStyleImage solve this issue? (relevant code below)<br>
<br> <span style="font-family:garamond,serif"> vtkSmartPointer<</span><span style="font-family:garamond,serif">vtkInteractorStyleImage> style = vtkSmartPointer<</span><span style="font-family:garamond,serif">vtkInteractorStyleImage>::New(</span><span style="font-family:garamond,serif">);<br>
style-></span><span style="font-family:garamond,serif">SetInteractionModeToImageSlici</span><span style="font-family:garamond,serif">ng();<br> <br> //create an instance of the mouse and keypress style interactor<br>
vtkSmartPointer<Interaction> mouseStyle = vtkSmartPointer<Interaction>::</span><span style="font-family:garamond,serif">New();<br> mouseStyle-></span><span style="font-family:garamond,serif">SetDefaultRenderer(renderer);<br>
<br> iren->SetInteractorStyle(</span><span style="font-family:garamond,serif">style);<br> iren->SetInteractorStyle( mouseStyle );<br>
<br> renderWindow->SetInteractor(</span><span style="font-family:garamond,serif">iren);<br> <br> renderWindow->Render();<br> <br> vtkSmartPointer<vtkCamera> camera = renderer->GetActiveCamera();<br>
camera->ParallelProjectionOn()</span><span style="font-family:garamond,serif">;<br>
<br> renderer-></span><span style="font-family:garamond,serif">ResetCameraClippingRange(); <br> renderWindow->Render();<br> <br> <br> iren->Start(); <br> return EXIT_SUCCESS;</span><br>
<br>Sahithya<br><div class="gmail_extra"><br></div>