Hello,
I can think of one dirty way to do it. vtkTextureObject
has the overloaded CopyToFrameBuffer()
method (https://vtk.org/doc/nightly/html/classvtkTextureObject.html#a3801bf2e51d41a5cc9f617146a1685b2) you can use to copy the texture’s fragments as pixels to the OpenGL’s frame buffer (used to contain the rendered pixels). Then, you can use some method based on OpenGL calls to save the frame buffer’s pixels as some image file: c++ - Save OpenGL rendering to an image file - Stack Overflow . After you save the image, just command another render to restore the original rendered scene.
take care,
PC