<div dir="ltr"><div><div><div>Hi Yihui,<br><br></div>I don't know if there is a built-in easy way to do this.  In the tomviz project we set the camera to orthographic projection and then set its view bounds so that the image fills the whole area (or as close as possible if the aspect ratios are different).  If someone knows a better way to do this, I would like to learn about it too.<br><br></div>HTH,<br></div>Shawn<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 25, 2016 at 5:07 AM, Yihui Cao <span dir="ltr"><<a href="mailto:yihui.cao@qq.com" target="_blank">yihui.cao@qq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<div><br></div><div>When I show a image slice in a QVTKWideget, the default setting that the image shown not in the center of the window, as shown in follow figure.</div><div><img src="cid:2E08F809@3A613275.FFF3A556"></div><div>As shown in fig above, the red color is the background. </div><div><br></div><div>Then, I add the code <span style="line-height:1.5">renderer->ResetCamera() </span><span style="line-height:1.5"> that the image is shown in the center, but a subsequent problem is the image is shown in a small region, as shown in follow</span></div><div><img src="cid:2F04F70C@3A613275.FFF3A556"></div><div>So, the question is how to make the image renderer full fill in the renderWindow?</div><div><br></div><div>Thanks!</div><span class="HOEnZb"><font color="#888888"><div>Yihui Cao</div><div><br></div><div><br></div></font></span><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></div>