<div dir="ltr"><div class="gmail_extra">Can you explain me how can I apply the gradient filter using python<br><br><br>this is my code<br><br>from paraview import servermanager<br>from paraview.simple import*<br>connection = servermanager.Connect()<br>

reader.FileName =&quot;/Users/........../disk_out_<div class="gmail_extra">ref.ex2&quot;<br><br>reader.UpdatePipeline()<br>pointData = servermanager.filters.CellDataToPointData(Input=reader)<br>pointData.UpdatePipeline()<br>
<br>gradData = servermanager.filters.CellDataToPointData(Input=reader)<br>
servermanager.filters.Contour.ContourBy = True<br>servermanager.filters.Contour.Isosurfaces = True<br><br>contourData = servermanager.filters.Contour(Input=pointData)<br>contourData.ContourBy = &#39;Temp&#39;<br>contourData.Isosurfaces = [400]<br>

contourData.UpdatePipeline()<br><br><br>servermanager.filters.DecimatePro.TargetReduction = True<br>dec = servermanager.filters.DecimatePro(Input=contourData)<br>dec.TargetReduction = 0.9<br>dec.UpdatePipeline()<br><br>view = servermanager.CreateRenderView()<br>

Show(dec, view)<br>Render(view)<br><br><br>Thanks</div><br><br><div class="gmail_quote">On Fri, Apr 27, 2012 at 6:01 PM, David E DeMarle <span dir="ltr">&lt;<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Apply the gradient filter first to make the temp gradient field, then<br>
contour the output of that but choose the original temp field as the<br>
one to contour. Finally choose the gradient field magnitude as the<br>
value to color the isosurface by.<br>
<br>
reader-&gt;gradient-&gt;contour<br>
<br>
David E DeMarle<br>
Kitware, Inc.<br>
R&amp;D Engineer<br>
21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>
Phone: 518-881-4909<br>
<div><div class="h5"><br>
<br>
On Fri, Apr 27, 2012 at 10:52 AM, Roba Binyahib<br>
&lt;<a href="mailto:roba.binyahib@kaust.edu.sa">roba.binyahib@kaust.edu.sa</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; Hi everyone<br>
&gt;<br>
&gt; I have applyed the contour filter on a dataset with isosurface Temp and I<br>
&gt; want to calculate the gradient of a variable Temp on the combustion dataset<br>
&gt; and use the magnitude of the gradient as a color map for the Temp isosurface<br>
&gt;<br>
&gt; how can I do that ?<br>
&gt;<br>
&gt;<br>
&gt; Thanks<br>
&gt;<br>
&gt;<br>
&gt; ---------------------------<br>
&gt;<br>
&gt; Best Regards,<br>
&gt; Roba<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ParaView Wiki at:<br>
&gt; <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
&gt;<br>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><br><br>---------------------------<br><br>Best Regards,<br>Roba<br></div><br>
</div></div>