[Paraview] Visualization ternary saturation

Moreland, Kenneth kmorel at sandia.gov
Mon May 8 13:56:23 EDT 2017


ParaView does not directly support ternary color maps, but if you create a field of colors (represented by three unsigned chars), then you can render those colors directly by turning off the Map Scalars option. You can create these colors with a Programmable Filter with a script like the following:

A = inputs[0].CellData['A']
B = inputs[0].CellData['B']
C = inputs[0].CellData['C']
colors = numpy.empty((len(A),3), dtype='uint8')
colors[:,0] = A*255
colors[:,1] = B*255
colors[:,2] = C*255
output.CellData.append(colors, 'colors')

Once you apply that script, color by the new “colors” array and uncheck the box marked “Map Scalars” (it is an advanced option in the properties panel).

-Ken

From: ParaView [mailto:paraview-bounces at paraview.org] On Behalf Of Thomas Oliveira
Sent: Saturday, May 6, 2017 7:24 AM
To: ParaView <paraview at paraview.org>
Subject: [EXTERNAL] [Paraview] Visualization ternary saturation

Dear all,
Given three cell arrays (A,B,C) representation saturations (A+B+C = 1 for every cell) is it possible to generate a ternary saturation image like the one attached (obtained in http://www.esss.com.br/Kraken/wp-content/uploads/2014/07/Ternary-Saturation.png)?
In the figure, A, B, C are saturations of water, oil and gas.
Best regards,
Thomas Oliveira
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170508/d70f71dd/attachment.html>


More information about the ParaView mailing list