[Paraview] RGB color coding
Casey Goodlett
casey.goodlett at kitware.com
Fri Aug 29 15:11:18 EDT 2014
Hi all,
I often do something similar when reading data originally from a text
table. In this case I need to turn 3 arrays into a single 3-component
uchar array for the purpose of RGB coloring. I found that I can also use
the following python calculator expression to accomplish this goal
(assuming the arrays are named 'R', 'G', 'B' respectively). This assumes
the values are already scaled between 0-255.
hstack([inputs[0].PointData['R'], inputs[0].PointData['G'],
inputs[0].PointData['B']]).astype(uint8)
--
Casey B. Goodlett, Ph.D.
Technical Leader
Kitware, Inc. - North Carolina Office
http://www.kitware.com
(919) 969-6990 x310
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20140829/e6b0fa6e/attachment.html>
More information about the ParaView
mailing list