<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Thanks for the suggestions, Ken. Neither had any effect, unfortunately.<br>
<br>
Cheers<br>
Gib<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF819522"><font color="#000000" size="2" face="Tahoma"><b>From:</b> Ken Martin [ken.martin@kitware.com]<br>
<b>Sent:</b> Wednesday, 18 November 2015 8:28 a.m.<br>
<b>To:</b> Gib Bogle<br>
<b>Cc:</b> vtkusers@vtk.org<br>
<b>Subject:</b> Re: [vtkusers] QVTKWidget camera problem<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">renderer->ResetCameraClippingRange() maybe? That and camera->OrthogonalizeViewUp() are the two common things to try when manual camera changes do not work.
<div><br>
</div>
<div>Thanks</div>
<div>Ken</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Nov 17, 2015 at 2:15 PM, Gib Bogle <span dir="ltr">
<<a href="mailto:g.bogle@auckland.ac.nz" target="_blank">g.bogle@auckland.ac.nz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt"><font size="3" face="Arial">I have now established conclusively that adjusting the camera setup with SetPosition and SetFocalPoint stops the scene from being displayed, while any
movement of the mouse with a button down restores display.<br>
<br>
<span style="color:#c0c0c0"></span><font face="Courier New"><span style="color:#800000">qvtkWidget</span><span style="color:#c0c0c0">
</span><span style="color:#000000">=</span><span style="color:#c0c0c0"> </span><span style="color:#808000">new</span><span style="color:#c0c0c0">
</span><span style="color:#800080">QVTKWidget</span><span style="color:#000000">(</span><span style="color:#000000">page</span><span style="color:#000000">,</span><span style="color:#800080">QFlag</span><span style="color:#000000">(</span><span style="color:#000080">0</span><span style="color:#000000">));</span></font></font>
<pre style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px"><font size="3" face="Courier New"><span style="color:#800000"><span style="color:#800080">QVBoxLayout</span><span style="color:#c0c0c0"> </span><span style="color:#000000">*</span><span style="color:#000000">layout</span><span style="color:#c0c0c0"> </span><span style="color:#000000">=</span><span style="color:#c0c0c0"> </span><span style="color:#808000">new</span><span style="color:#c0c0c0"> </span><span style="color:#800080">QVBoxLayout</span><span style="color:#000000">;</span>
l<span style="color:#000000">ayout</span><span style="color:#000000">-></span>addWidget<span style="color:#000000">(</span><span style="color:#800000">qvtkWidget</span><span style="color:#000000">);</span>
</span></font><span style="color:#c0c0c0"></span><span style="color:#800000">page_VTK</span><span style="color:#000000">-></span>setLayout<span style="color:#000000">(</span><span style="color:#000000">layout</span><span style="color:#000000">);</span>
<font size="3" face="Courier New"><span style="color:#800000">ren</span><span style="color:#c0c0c0"> </span><span style="color:#000000">=</span><span style="color:#c0c0c0"> </span><span style="color:#800080">vtkRenderer</span><span style="color:#000000">::</span>New<span style="color:#000000">();</span><span style="color:#c0c0c0"> </span></font></pre>
<font size="3" face="Courier New"></font>
<pre style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px"><font size="3" face="Courier New"><span style="color:#800000">renWin</span><span style="color:#c0c0c0"> </span><span style="color:#000000">=</span><span style="color:#c0c0c0"> </span><span style="color:#800000">qvtkWidget</span><span style="color:#000000">-></span><span style="font-style:italic; color:#000000">GetRenderWindow</span><span style="color:#000000">();</span></font></pre>
<font size="3" face="Courier New"></font>
<pre style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px"><font size="3" face="Courier New"><span style="color:#800000">renWin</span><span style="color:#000000">-></span><span style="font-style:italic; color:#000000">AddRenderer</span><span style="color:#000000">(</span><span style="color:#800000">ren</span><span style="color:#000000">);</span></font></pre>
<font size="3" face="Courier New"><span style="color:#c0c0c0"></span><span style="color:#800000">ren</span><span style="color:#000000">-></span>ResetCamera<span style="color:#000000">();</span><span style="color:#c0c0c0">
</span><span style="color:#800000"><br>
iren</span><span style="color:#c0c0c0"> </span><span style="color:#000000">=</span><span style="color:#c0c0c0">
</span><span style="color:#800000">qvtkWidget</span><span style="color:#000000">-></span><span style="font-style:italic; color:#000000">GetInteractor</span><span style="color:#000000">();</span>
</font>
<pre style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px"><font size="3" face="Courier New"><span style="color:#800080">vtkSmartPointer</span><span style="color:#000000"><</span><span style="color:#800080">MouseInteractorStyle4</span><span style="color:#000000">></span><span style="color:#c0c0c0"> </span><span style="color:#000000">style</span><span style="color:#c0c0c0"> </span><span style="color:#000000">=</span><span style="color:#c0c0c0"> </span><span style="color:#800080">vtkSmartPointer</span><span style="color:#000000"><</span><span style="color:#800080">MouseInteractorStyle4</span><span style="color:#000000">>::</span>New<span style="color:#000000">();</span></font></pre>
<font size="3" face="Courier New"></font>
<pre style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px"><font size="3" face="Courier New"><span style="color:#800000">iren</span><span style="color:#000000">-></span><span style="font-style:italic; color:#000000">SetInteractorStyle</span><span style="color:#000000">(</span><span style="color:#c0c0c0"> </span><span style="color:#000000">style</span><span style="color:#c0c0c0"> </span><span style="color:#000000">);</span></font></pre>
<font size="3" face="Courier New"></font>
<pre style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px"><font size="3" face="Courier New"><span style="color:#800000">iren</span><span style="color:#000000">-></span><span style="font-style:italic; color:#000000">Initialize</span><span style="color:#000000">();</span></font></pre>
<font size="3" face="Courier New"></font>
<pre style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px"><font size="3"><font face="Courier New"><span style="color:#800000">ren</span><span style="color:#000000">-></span>GetActiveCamera<span style="color:#000000">()-></span>SetPosition<span style="color:#000000">(</span><span style="color:#000080">0</span><span style="color:#000000">,</span><span style="color:#c0c0c0"> </span><span style="color:#000080">0</span><span style="color:#000000">,</span><span style="color:#c0c0c0"> </span><span style="color:#000080">0</span><span style="color:#000000">);</span>
<span style="color:#c0c0c0"></span><span style="color:#800000">ren</span><span style="color:#000000">-></span>GetActiveCamera<span style="color:#000000">()-></span>SetFocalPoint<span style="color:#000000">(</span><span style="color:#000000">x0</span><span style="color:#000000">,</span><span style="color:#c0c0c0"> </span><span style="color:#000000">x0</span><span style="color:#000000">,</span><span style="color:#c0c0c0"> </span><span style="color:#000000">x0</span><span style="color:#000000">);</span></font>
</font><pre style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:0px"><font size="3"><br></font></pre></pre>
<font size="3" face="Arial">If I remove the last two lines the scene is centred OK, but not at the scale I want. I can play with Zoom(), but SetFocalPoint(x0,x0,x0) ensures that I get the desired scaling directly.<br>
Is this the expected behaviour? I'm wondering if it is the result of using the QVTKWidget "default" camera instead of creating a new one to use (please excuse deficiencies in my understanding). Is Zoom() the only way to achieve what I want?</font><br>
</div>
</div>
<br>
_______________________________________________<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/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_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=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">Ken Martin PhD
<div>Chairman & CFO<br>
Kitware Inc.<br>
28 Corporate Drive<br>
Clifton Park NY 12065<br>
518 371 3971
<div><br>
</div>
<div><span style="font-size:10pt; font-family:Tahoma,sans-serif">This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else
is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the
original message. Thank you.</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>