<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">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:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:9.0pt;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt">
<span style="font-size:10.0pt;font-family:"Courier New"">A <span style="color:#666666">
=</span> inputs[<span style="color:#666666">0</span>]<span style="color:#666666">.</span>CellData[<span style="color:#BA2121">'A'</span>]<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">B
<span style="color:#666666">=</span> inputs[<span style="color:#666666">0</span>]<span style="color:#666666">.</span>CellData[<span style="color:#BA2121">'B'</span>]<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">C
<span style="color:#666666">=</span> inputs[<span style="color:#666666">0</span>]<span style="color:#666666">.</span>CellData[<span style="color:#BA2121">'C'</span>]<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">colors
<span style="color:#666666">=</span> numpy<span style="color:#666666">.</span>empty((<span style="color:green">len</span>(A),<span style="color:#666666">3</span>), dtype<span style="color:#666666">=</span><span style="color:#BA2121">'uint8'</span>)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">colors[:,<span style="color:#666666">0</span>]
<span style="color:#666666">=</span> A<span style="color:#666666">*255</span><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">colors[:,<span style="color:#666666">1</span>]
<span style="color:#666666">=</span> B<span style="color:#666666">*255</span><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">colors[:,<span style="color:#666666">2</span>]
<span style="color:#666666">=</span> C<span style="color:#666666">*255</span><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">output<span style="color:#666666">.</span>CellData<span style="color:#666666">.</span>append(colors,
<span style="color:#BA2121">'colors'</span>)</span><span style="font-size:10.0pt;font-family:"Courier New";color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">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).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">-Ken<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> ParaView [mailto:paraview-bounces@paraview.org]
<b>On Behalf Of </b>Thomas Oliveira<br>
<b>Sent:</b> Saturday, May 6, 2017 7:24 AM<br>
<b>To:</b> ParaView <paraview@paraview.org><br>
<b>Subject:</b> [EXTERNAL] [Paraview] Visualization ternary saturation<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Dear all,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">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
<a href="http://www.esss.com.br/Kraken/wp-content/uploads/2014/07/Ternary-Saturation.png">
http://www.esss.com.br/Kraken/wp-content/uploads/2014/07/Ternary-Saturation.png</a>)?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">In the figure, A, B, C are saturations of water, oil and gas.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Best regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thomas Oliveira<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>