[vtkusers] Save view image without rendering
Clinton Stimpson
clinton at elemtech.com
Wed Nov 9 10:10:51 EST 2005
>Date: Wed, 9 Nov 2005 03:08:43 +0530
>From: "Divya Rathore" <divyaksr at iitk.ac.in>
>Subject: [vtkusers] Save view image without rendering
>To: <vtkusers at vtk.org>
>
>Hi! All,
>
>I have 2 querries..
>
>[1] Can I save a view as an image (say, bmp/jpg) without actually rendering
>the scene onscreen?
>
>
Yes. Call vtkRenderWindow::OffscreenRenderingOn(). Despite what has
been said about this working on certain platforms in the past, it now
works on Windows, X11, and Carbon using the CVS version of VTK.
>Have got a couple of cut-n-dried procedures over volume data which I want to
>save as images.
>
>
>[2] How do I control the camera angles programmatically? Is there a
>documented list of numerical parameters for following? Please indicate other
>such functions for 3D volume visulization.
>
>vtkCamera *aCamera = vtkCamera::New();
>aCamera->SetViewUp (0, 0, -1); // what would these numerics do
>geometrically?
>
>
That sets what is "up". So the z = -1 side of the model would be up
towards the top of the screen.
>aCamera->SetPosition (0, 1, 0); // what would these numerics do
>geometrically?
>
>
That's the location of your eye.
>aCamera->SetFocalPoint (0, 0, 0); // what would these numerics do
>geometrically?
>
>
That's the location your eye is looking at.
>aCamera->Azimuth(90); // what would these numerics do geometrically?
>
>
That's like walking around the model keeping your eye fixed on the focal
point.
>aCamera->Elevation(90); // what would these numerics do geometrically?
>
>
rotate up or down keeping your eye fixed on the focal point.
There's documentation for this.
http://www.vtk.org/doc/nightly/html/classvtkCamera.html
Clint
More information about the vtkusers
mailing list