vtkImageViewer2 creates it's own vtkInteractorStyleImage (funky, I know). You have to let vtkImageView2 set it's interactor style on your Render Window's Interactor via viewer->SetupInteractorStyle(renderWindow->GetInteractor()). Here is a blob of code that does this (note it's in C#).<div>
<br></div><div><div> this.imageViewerAxial.SetRenderWindow(this.renderWindowAxial);</div><div> this.imageViewerAxial.SetRenderer(this.rendererAxial);</div><div> this.imageViewerAxial.SetupInteractor(this.renderWindowAxial.GetInteractor());</div>
<div><br></div><div><div class="gmail_quote">On Sat, Sep 18, 2010 at 5:18 AM, Karthik Krishnan <span dir="ltr"><<a href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
It should. Are you overriding the default vtkInteractorStyleImage style that vtkImageViewer2 uses.<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Sat, Sep 18, 2010 at 1:20 AM, Leonardo M. Ramé <span dir="ltr"><<a href="mailto:l.rame@griensu.com" target="_blank">l.rame@griensu.com</a>></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'm replacing an vtkImageVewer to vtkImageViewer2, but I noted the<br>
WindowLevel adjustment by dragging the left mouse button doesn't works.<br>
How can I adjust W/L with vtkImageViewer2?.<br>
<br>
--<br>
Leonardo M. Ramé<br>
Medical IT - Griensu S.A.<br>
Av. Colón 636 - Piso 8 Of. A<br>
X5000EPT -- Córdoba<br>
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979<br>
Cel.: +54(351)5394365<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br>
</div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div></div>