[vtkusers] save a 3D perspective view as an image

Thomas Obenaus thomaso at eas.iis.fraunhofer.de
Tue Aug 11 03:05:02 EDT 2009


Hi ToulGen,

here is a short code-snipped (Java) which resolved the problem form me:

vtkRenderer renderer = this.canvas3D.GetRenderer( );	
vtkRenderLargeImage renderLarge = new vtkRenderLargeImage( );
renderLarge.SetInput( renderer );
renderLarge.SetMagnification( 1 );
	
// write the view to png-file
String filename = "test.png";
vtkPNGWriter png_w = new vtkPNGWriter( );
png_w.SetInput( renderLarge.GetOutput( ) );
png_w.SetFileName( filename );			
png_w.Write( );

-- 
View this message in context: http://www.nabble.com/save-a-3D-perspective-view-as-an-image-tp24896643p24912718.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list