[vtkusers] 16Bit per color channel?

David Gobbi david.gobbi at gmail.com
Wed Mar 21 16:14:30 EDT 2018


If you use vtkWindowToImageFilter, the retrieved data is always 8 bits per
channel.  If you need higher precision, you can try directly calling the
GetRGBAPixelData() method of the vtkRenderWindow, which retrieves the data
as an array of floats.  Whether this actually gives you the precision you
desire will depend on the bit depth of the OpenGL color buffer.

Also note that the vtkLookupTable and much of VTK's internal color handling
assumes 8 bits per channel.

 - David


On Wed, Mar 21, 2018 at 4:56 AM, Sophonet <vtk12af6bc42 at kant.sophonet.de>
wrote:

> Hi list,
>
> using OSMesa for offscreen rendering (and VTK 8.1.0) I would like to save
> the renderwindow content (vtkWindowToImageFilter) with 16 bits per color
> channel to file. PNG would support 16 bits per channel (
> https://en.wikipedia.org/wiki/Portable_Network_Graphics), but I am
> wondering how to set things up via VTK. Any hint?
>
> Thanks,
>
>     sophonet
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180321/9bf6334d/attachment.html>


More information about the vtkusers mailing list