[vtkusers] vtkWindowToImageFilter ignores vtkBillboardTextActor3D actors from renderer
M. Jordan
mjordan at live.at
Mon Feb 13 11:17:54 EST 2017
Hi,
I use the following lines of code to save the screen to a .png file.
// set up screenshot
vtkSmartPointer<vtkWindowToImageFilter> windowToImageFilter =
vtkSmartPointer<vtkWindowToImageFilter>::New();
windowToImageFilter->SetInput(renderer->GetRenderWindow());
//set the resolution of the output image
windowToImageFilter->SetMagnification(Quality);
//also record the alpha (transparency) channel
windowToImageFilter->SetInputBufferTypeToRGBA();
// read from the back buffer
windowToImageFilter->ReadFrontBufferOff();
windowToImageFilter->Update();
// write image
vtkSmartPointer<vtkPNGWriter> writer =
vtkSmartPointer<vtkPNGWriter>::New();
QString full_path = Path + "/Screenshot_" + QTime::currentTime().toString().remove(":") + ".png";
writer->SetFileName(full_path.toStdString().c_str());
writer->SetInputConnection(windowToImageFilter->GetOutputPort());
writer->Write();
Everything works great but the vtkBillboardTextActor3D actors are not part of the resulting image.
(Of course I added them to the renderer and I can see the text on the screen!)
What could be the problem?
Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170213/84083cf1/attachment.html>
More information about the vtkusers
mailing list