Save window rendering results to image

Dear VTK team,

I’m looking for a way to save my rendering results from the RenderWindow to an image in VTK.js. In python for example I did it using vtkWindowToImageFilter function but I cannot find something like this in VTK.js. Could you please advice me something?


Hi, you can take a screenshot of your vtk.js window via captureImages:

  (image) => { console.log(image); }

image will contain a data URI with a png-encoded image.

1 Like

Thank you so much!