[Paraview] Visualization ternary saturation

Moreland, Kenneth kmorel at sandia.gov
Mon May 8 19:03:00 EDT 2017


Shawn,

I tried it your way in ParaView 5.3.0, and it did not work correctly. Are you sure this is implemented in 5.3 and not a new feature in the upcoming 5.4?

-Ken

From: Shawn Waldon [mailto:shawn.waldon at kitware.com]
Sent: Monday, May 8, 2017 12:11 PM
To: Moreland, Kenneth <kmorel at sandia.gov>
Cc: Thomas Oliveira <thomas.oliveira at gmail.com>; ParaView <paraview at paraview.org>
Subject: [EXTERNAL] Re: [Paraview] Visualization ternary saturation

Ken beat me to answering this one... I'll just add that if the data is floating point in the range [0, 1], you don't need to convert it to uint8 or multiply by 255.  Just creating a floating point vector will give the same result.  This is a more recent extension of the functionality: I know it works in 5.3 and master but I'm not sure how many versions back support it.
A = inputs[0].CellData['A']
B = inputs[0].CellData['B']
C = inputs[0].CellData['C']
colors = numpy.empty((len(A),3), dtype='float')
colors[:,0] = A
colors[:,1] = B
colors[:,2] = C
output.CellData.append(colors, 'colors')

HTH,
Shawn

On Mon, May 8, 2017 at 1:56 PM, Moreland, Kenneth <kmorel at sandia.gov<mailto:kmorel at sandia.gov>> wrote:
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<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<mailto: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

_______________________________________________
Powered by www.kitware.com<http://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

Search the list archives at: http://markmail.org/search/?q=ParaView

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170508/482820ab/attachment.html>


More information about the ParaView mailing list