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

steelblue 812075761 at qq.com
Wed Oct 26 11:02:51 EDT 2011


hi everyone:

   i have problem about save vtkRenderWindow as JPEG file,
   this is my code:

                 vtkRenderWindow
renWin=vtkpanel.getRenderWindow();//vtkpanel is a vtkPanel
                 vtkWindowToImageFilter w2i =new vtkWindowToImageFilter();		   
		 w2i.SetInput(renWin);
		 w2i.Modified();
		 vtkJPEGWriter writer =new  vtkJPEGWriter();
		 writer.SetInput(w2i.GetOutput());
		 writer.SetFileName("f://vtk.jpg");
		 writer.Write();

  but the result only a JPEG file that is black,total black ,,..

  the problem bothered me so much,,who can give me a solution......
  thanks so so much!!

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



More information about the vtkusers mailing list