<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #333399;font-size: 10pt;">Thanks Cory!<br>
<br>
Matthieu<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF703344"><font face="Tahoma" color="#000000" size="2"><b>From:</b> Cory Quammen [cory.quammen@kitware.com]<br>
<b>Sent:</b> Friday, October 30, 2015 2:19 PM<br>
<b>To:</b> Dorier, Matthieu<br>
<b>Cc:</b> Paraview (paraview@paraview.org)<br>
<b>Subject:</b> Re: [Paraview] Changing colormap parameters in a Catalyst script<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr"><span style="font-size:12.8px">Mattheiu,</span>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">For rescaling when your data range is known, use:</div>
<div style="font-size:12.8px"><br>
</div>
<span style="font-size:12.8px">a1_dbz_PiecewiseFunction.</span><span style="font-size:12.8px">RescaleTransferFunction(min, max)</span><br style="font-size:12.8px">
<span style="font-size:12.8px">a1_dbz_PVLookupTable.</span><span style="font-size:12.8px">RescaleTransferFunction(min, max)</span><br style="font-size:12.8px">
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">When it is unknown, you can use</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">pipelineObject = GetActiveSource()</div>
<div style="font-size:12.8px">display = GetDisplayProperties(pipelineObject)</div>
<div style="font-size:12.8px">display.RescaleTransferFunctionToDataRange(False)</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">You can change the False argument to True in the second line if you want the rescaling to only extend the current range instead of possibly shrinking it.</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">Hope that helps,</div>
<div style="font-size:12.8px">Cory</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Oct 30, 2015 at 2:59 PM, Dorier, Matthieu <span dir="ltr">
<<a href="mailto:mdorier@anl.gov" target="_blank">mdorier@anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#333399; font-size:10pt">
<div style="direction:ltr; font-family:Tahoma; color:#333399; font-size:10pt">Hi,<br>
<br>
I have generated a Catalyst python script that produces a colormap on a slice of a 3D rectilinear grid. I would like to use the same script for another variable of the simulation, but the range of data is not the same. How can I adapt the script, both in case
 where I know the new data range, and in case I don't know and want the colormap to simply figure it out?<br>
<br>
I believe the part of the script that deals with that is as follows:<br>
<br>
a1_dbz_PiecewiseFunction = CreatePiecewiseFunction( Points=[-36.903831481933594, 0.0, 0.5, 0.0, 57.036045074462891, 1.0, 0.5, 0.0] )<br>
<br>
a1_dbz_PVLookupTable = GetLookupTableForArray( "dbz", 1, RGBPoints=[-36.903831481933594, 0.23000000000000001, 0.29899999999999999, 0.754, 10.066106796264648, 0.86499999999999999, 0.86499999999999999, 0.86499999999999999, 57.036045074462891, 0.70599999999999996,
 0.016, 0.14999999999999999], VectorMode='Magnitude', NanColor=[0.25, 0.0, 0.0], ScalarOpacityFunction=a1_dbz_PiecewiseFunction, ColorSpace='Diverging', ScalarRangeInitialized=1.0 )<br>
<br>
But I don't know how to adapt it.<br>
<br>
Thanks,<br>
<br>
Matthieu<br>
<br>
<br>
</div>
</div>
</div>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">
http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">
http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">Cory Quammen<br>
R&D Engineer<br>
Kitware, Inc.</div>
</div>
</div>
</div>
</div>
</body>
</html>