I ended up copying vtkInteractorStyleImage and vtkInteractorStyleTrackballCamera and deleting the methods that enabled rotation. I renamed them and did all the following required name changes. Since I&#39;m using QVTKWidget, I got the interactor (iren = qvtkWidget-&gt;GetRenderWindow()-&gt;GetInteractor();) and then set the interactor style from there (iren-&gt;SetInteractorStyle(istyle);). It seemed to work decently. A little annoying to do but what work, works, I suppose.<br>
<br>-Tina<br><br><div class="gmail_quote">On Mon, Jun 22, 2009 at 2:06 PM, kent williams <span dir="ltr">&lt;<a href="mailto:nkwmailinglists@gmail.com">nkwmailinglists@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I was attempting to answer Tina Zhang&#39;s question, because I thought I<br>
knew most of the answer; turns out the method I thought would work<br>
dead-ends before it gets where she wants to go.<br>
<br>
My first response was &#39;Oh, you just get a handle on the<br>
InteractorStyle and configure it to suppress rotation!&#39;<br>
<br>
But it turns out, there are two problems with this idea.<br>
<br>
1) The vtkInteractorStyleImage has no methods to e.g. suppress the<br>
rotation action.<br>
2) You could write your own class with vtkInteractorStyleImage and<br>
redefine the event handlers, but ... there&#39;s no method to set the<br>
InteractorStyle for vtkImageViewer2.  You can get it but you can&#39;t set<br>
it!<br>
<br>
I think I hit this dead end a year or so ago, and started using<br>
vtkinria3d, because their analog to vtkImageViewer2 DOES let you<br>
suppress and redefine the event bindings.<br>
<br>
The fact of the matter is that despite all the things using<br>
vtkImageViewer2 does to you, its stock configuration doesn&#39;t fit every<br>
possible application, and it seems resistant to customization, so much<br>
so that I think most people throw up their hands and either hack the<br>
vtkImageViewer2 source code into their own custom class, or just give<br>
up.<br>
<br>
On Mon, Jun 22, 2009 at 12:08 PM, Tina Zhang&lt;<a href="mailto:zhang.tina.t@gmail.com">zhang.tina.t@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; I&#39;m using ImageViewer2 to display dicom images; how would I disable rotation<br>
&gt; but keep zoom and pan?<br>
&gt;<br>
&gt; -Tina<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br>