[vtkusers] a question about save vtkRenderWindow as JPEG file...
Jothybasu Selvaraj
jothybasu at gmail.com
Wed Oct 26 11:13:00 EDT 2011
Can you try replacing w2i.Modified() with w2i.Update() ?
Jothy
On Wed, Oct 26, 2011 at 4:02 PM, steelblue <812075761 at qq.com> wrote:
> 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.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
--
Jothybasu K Selvaraj
PhD Student
University of Liverpool
Liverpool,UK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111026/a83da6f8/attachment.htm>
More information about the vtkusers
mailing list