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

Shawn Waldon shawn.waldon at kitware.com
Mon Jan 25 09:56:53 EST 2016


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/20160125/f3f47612/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2E08F809 at 3A613275.FFF3A556
Type: application/octet-stream
Size: 99134 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160125/f3f47612/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2F04F70C at 3A613275.FFF3A556
Type: application/octet-stream
Size: 91364 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160125/f3f47612/attachment-0003.obj>


More information about the vtkusers mailing list