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
_______________________________________________
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 ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to