<div dir="ltr">Hi Panos,<div><br></div><div>I just remembered that vtkInteractorStyleImage provides a convenience method for positioning the camera called SetImageOrientation().  Unlike "Azimuth()" it specifies an absolution orientation, rather than a relative orientation:</div><div><br></div><div>// set the camera view via row and column directions,</div><div>// these directions must be at right angles to each other</div><div>double vLeftToRight[3] = { 0.0, 1.0, 0.0 };</div><div>double vBottomToTop[3] = { 0.0, 0.0, 1.0 };</div><div>style->SetCurrentRenderer(renderer);</div><div>style->SetImageOrientation(vLeftToRight, vBottomToTop);</div><div><br></div><div>As for the "sliding image" problem that you saw, I just checked on my own system and I see exactly the same issue.  It seems to be related to the OpenGL2 backend, I'll have to dig into the mapper code to see what's up.  The odd thing is, I use vtkImageResliceMapper all the time and I have not seen this problem before.  However, I almost never use it with vtkInteractorStyleImage.</div><div><br></div><div>If you don't need oblique views, you can try switching to vtkImageSliceMapper as a temporary solution.  Note that you'll have to remove the SetNormal() call from your code.</div><div><br></div><div> - David</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 13, 2018 at 8:47 AM, ochampao <span dir="ltr"><<a href="mailto:ochampao@hotmail.com" target="_blank">ochampao@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi David,<br>
<br>
Thanks for your reply. Changing the position of the camera works, as you<br>
suggested.<br>
<br>
What I have noticed now is that when I reach the first or final slice<br>
(min/max clipping planes) and if I keep trying to change the slice by<br>
pressing Ctrl+Left-Mouse-Button, the image moves to the right (min clipping<br>
plane) or the left (max clipping plane) instead of remaining in the centre<br>
of the view. This does not happen with the original slicing plane (before<br>
moving the camera). Here is a slide to describe the effect:<br>
<a href="https://pasteboard.co/HbIKTZT.png" rel="noreferrer" target="_blank">https://pasteboard.co/HbIKTZT.<wbr>png</a><br>
<br>
Do you know why this happens and how to stop it?<br>
<br>
This is the code I am using to setup and move the camera:<br>
<br>
renderer->GetActiveCamera()-><wbr>Azimuth(90);<br>
renderer->GetActiveCamera()-><wbr>OrthogonalizeViewUp();<br>
renderer->GetActiveCamera()-><wbr>ParallelProjectionOn();<br>
renderer-><wbr>ResetCameraClippingRange();<br>
renderer->ResetCamera();<br>
<br>
Thanks,<br>
Panos<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/VTK-Users-f1224199.html</a><br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>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" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://vtk.org/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://vtk.org/mailman/<wbr>listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div>