Re: VTK Screenshot save images different as the visualization in renderer window
Andrew Maclean <[email protected]>
| Newsgroups | gmane.comp.lib.vtk.user |
|---|---|
| Message-ID | <CAHDsG9MoLUVurSit4AkBR2BB=tKFQ2OW7TtbYLO6d=eiYWmSnA@mail.gmail.com> |
Use the drop in code in https://lorensen.github.io/VTKExamples/site/Python/Snippets/, in particular: https://lorensen.github.io/VTKExamples/site/Python/Snippets/WriteImage/ These are designed for copy/pasting into your code (there is also a C++ equivalent and a cut-down Java one available too). This code works. I suspect that you need to set SetInputBufferTypeToRGB() in vtkWindowToImageFilter. I'm currently working through all the Python examples and I'll fix this one when I get to it. Regards Andrew > ---------- Forwarded message ---------- > From: Elhassan Abdou <[email protected]> > To: szx0112 <[email protected]> > Cc: VTK Users <[email protected]> > Bcc: > Date: Tue, 8 Jan 2019 09:58:47 +0100 > Subject: Re: [vtkusers] VTK Screenshot save images different as the > visualization in renderer window > Hi all > > I am facing a similar problem any answer or solution for this issue > > Regards > Elhassan > > On Mon, Jan 7, 2019 at 12:37 AM szx0112 <[email protected]> wrote: > >> I follow the tutorial for screenshot in python: >> https://lorensen.github.io/VTKExamples/site/Python/Utilities/Screenshot/ >> <https://lorensen.github.io/VTKExamples/site/Python/Utilities/Screenshot/> >> >> >> This is the camera view in the renderer window >> <http://vtk.1045678.n5.nabble.com/file/t342668/unnamed.png> >> >> The screen shot suppose to capture this camera view, however the saved png >> image is a different view: >> <http://vtk.1045678.n5.nabble.com/file/t342668/unnamed-2.png> >> >> Am I using the right method? Any comment is appreciated >> >> >> >> >> -- >> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html >> _______________________________________________ >> 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 >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> > > > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ _______________________________________________ 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 Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers