[vtkusers] a question about save vtkRenderWindow as JPEG file...

steelblue 812075761 at qq.com
Fri Oct 28 11:35:27 EDT 2011


I get the result ,when i run the program on a linux system ,which is
installed on a vm...
but only HardCopy() take effect,,
the code i write also does not work,
        private void exportImage( vtkRenderWindow renWin ) {
		 vtkWindowToImageFilter w2i =new vtkWindowToImageFilter();		   
		 w2i.SetInput(renWin);
		 w2i.Modified();
		 vtkJPEGWriter writer =new  vtkJPEGWriter();
		 writer.SetInput(w2i.GetOutput());
		 writer.WriteToMemoryOff(); 
		 writer.SetFileName("//root//Desktop//vtk.jpg");
		 writer.Write();
	}
eclipse report a problem:*Xlib unexpected async reply*,what is wrong with
this?


--
View this message in context: http://vtk.1045678.n5.nabble.com/a-question-about-save-vtkRenderWindow-as-JPEG-file-tp4940006p4946347.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list