[vtkusers] How can I save the contents of a QVTKWidget as an image?

Mike Taverne mtaverne at engits.com
Mon Sep 14 07:01:59 EDT 2009


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. :(




More information about the vtkusers mailing list