[vtkusers] 回复: How to make a image slice renderer full fill in a renderWindow?

Yihui Cao yihui.cao at qq.com
Tue Jan 26 03:08:31 EST 2016


Hi Shawn,


I tried to set the bounds of camera, but it still can not full fill. Now I used setting the zoom factor of camera instead. 
I guess there must has some better way. 


Thanks.
Yihui Cao




------------------ 原始邮件 ------------------
发件人: "Shawn Waldon";<shawn.waldon at kitware.com>;
发送时间: 2016年1月25日(星期一) 晚上10:56
收件人: "Yihui Cao"<yihui.cao at qq.com>; 
抄送: "vtkusers"<vtkusers at vtk.org>; 
主题: Re: [vtkusers] How to make a image slice renderer full fill in a renderWindow?



Hi Yihui,


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.


HTH,

Shawn


On Mon, Jan 25, 2016 at 5:07 AM, Yihui Cao <yihui.cao at qq.com> wrote:
Dear all,

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.

As shown in fig above, the red color is the background. 


Then, I add the code renderer->ResetCamera()  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

So, the question is how to make the image renderer full fill in the renderWindow?


Thanks!
Yihui Cao





_______________________________________________
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
 
 Search the list archives at: http://markmail.org/search/?q=vtkusers
 
 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160126/3da1b271/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4D5DD7F9 at BF365607.7F29A756
Type: application/octet-stream
Size: 91364 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160126/3da1b271/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 9B8007A0 at BF365607.7F29A756
Type: application/octet-stream
Size: 99134 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160126/3da1b271/attachment-0003.obj>


More information about the vtkusers mailing list