Okay I fixed it by inheriting from vtkInteractorStyleImage instead of vtkInteractorStyleTrackballCamerera.<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 10, 2012 at 9:00 AM, Sahithya Wintrich <span dir="ltr"><<a href="mailto:s.prakash@csuohio.edu" target="_blank">s.prakash@csuohio.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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<div class="im">
<br>
vtkSmartPointer<Interaction> mouseStyle = vtkSmartPointer<Interaction>::</div></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>
</blockquote></div><br></div>