[vtkusers] How can I save the contents of a QVTKWidget as an image?
Clinton Stimpson
clinton at elemtech.com
Mon Sep 14 11:21:37 EDT 2009
You should use the normal methods for capturing images, not the cachedImage in
QVTKWidget. Why that normal method doesn't work for you on Windows, I'm not
sure.
Clint
On Monday 14 September 2009 05:01:59 am Mike Taverne wrote:
> Ok, now I use the following:
> ==========
> vtkPNGWriter* writer = vtkPNGWriter::New();
> writer->SetInput(this->cachedImage());
> writer->SetFileName(qPrintable(filename));
> writer->Write();
>
> writer->Delete();
> ==========
>
>
> But then a part of my screen is saved along with the image, i.e. it acts
> like a screenshot box, but not correctly centered on the widget. :(
>
> _______________________________________________
> 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