[vtkusers] a question about save vtkRenderWindow as JPEG file...
Sebastien Jourdain
sebastien.jourdain at kitware.com
Fri Oct 28 12:41:45 EDT 2011
Did you run that code inside the EDT ? The other problem that I'm
seeing is that the Lock method is not called.
Other than that, you can inherit vtkPanel and implement your own class
that has a capture method with the image format that you want.
On Fri, Oct 28, 2011 at 11:35 AM, steelblue <812075761 at qq.com> wrote:
> 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.
> _______________________________________________
> 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
>
More information about the vtkusers
mailing list