[vtk-developers] New Stereo Mode
David Cole
david.cole at kitware.com
Mon Jun 20 11:01:22 EDT 2005
vtkRenderer derives from vtkViewport. You can call
vtkViewport::SetViewport(xmin, ymin, xmax, ymax) to make the renderer
take up some fractional space of the render window... (Calling it with
0, 0, 0.5, 1.0 will make it take up the left half of the window, for
example. 0.5, 0, 1.0, 1.0 would be the right half, etc.) Then you have
to put another renderer into the other half of the window, or you'll end
up with an undefined area of your window.
HTH,
David
Thomas Hansen wrote:
>I have modified the vtkRenderWindow class and added a new stereo mode [3].
> The stereo mode displays the left and right images next to each other
>for use with our stereoscopic visualization environment (SVEN) [1].
>Our setup consists of two projectors and a set of polarised lenses;
>it is very much similar to the Geowall project [2].
>
>I had monitored the vtk-users list for quite a while and had found
>some posts in the archives from users looking for this functionality,
>and finally decided to just implement it. I am aware that the same
>effect is achievable by using the CrystalEyes mode with a quad
>buffered video card. However we are trying to keep the budget low,
>and the modifications now allow vtk and our setup to work with any
>dual-head graphics card.
>
>Currently the new stereo mode works fine, but is implemented in a
>rather inefficient way. I looked at how the other stereo modes were
>implemented and used them as somewhat of a template; which brings up
>my main concern: The current implementation kind of chops half of
>both images off and places the remains next to each other. That of
>course causes both images to be rendered at twice the width of what
>would actually be required (Which is quite noticeable when the window
>spans two full screens). Also, to obtain correct results, I am
>currently relying on the phenomenon that the size of the rendered
>objects (zoom factor?) is changes only based on the heigth of the
>window and not the width (A quarter of each image is cut off on both
>sides). I would like to make sure that this is a feature of the vtk,
>and not some strange coincidence.
>
>I have thought of some alternative ways to get around this problem,
>including writing an entirely new subclass of vtkRenderWindow, but at
>the same time I would like to stick close to the API with regard to
>how the other stereo modes are used. Also there might be easier ways
>to control the size of the images being rendered without breaking
>anything else? I really just started using the vtk, and have looked
>at the Renderer classes, but cant find a way to trick them into
>rendering half width of the RendererWindow.
>
>I would greatly appreciate any comment, concerns or genius ideas on
>how to easily fix this.
>
>Thanks;
> -Thomas Hansen <thomas.hansen at wartburg.edu>
>
>[1] http://mcsp.wartburg.edu/SVEN/
>[2] http://geowall.geo.lsa.umich.edu/
>
>[3] The files were to big for teh mailing list i guess, so i put them online:
>
> http://thomas.3kings.de/vtk/vtkRenderWindow.cxx
> http://thomas.3kings.de/vtk/vtkRenderWindow.h
>_______________________________________________
>vtk-developers mailing list
>vtk-developers at vtk.org
>http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
>
More information about the vtk-developers
mailing list