[vtkusers] VTK Screenshot save images different as the visualization in renderer window

Andrew Maclean andrew.amaclean at gmail.com
Tue Jan 8 15:23:43 EST 2019


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 <elhassan.abdou at gmail.com>
> To: szx0112 <szx0112 at gmail.com>
> Cc: VTK Users <vtkusers at vtk.org>
> 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 <szx0112 at gmail.com> 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

___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20190109/e5154b23/attachment.html>


More information about the vtkusers mailing list