<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 ="/Users/........../disk_out_<div class="gmail_extra">ref.ex2"<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 = 'Temp'<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"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></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->gradient->contour<br>
<br>
David E DeMarle<br>
Kitware, Inc.<br>
R&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>
<<a href="mailto:roba.binyahib@kaust.edu.sa">roba.binyahib@kaust.edu.sa</a>> wrote:<br>
><br>
><br>
> Hi everyone<br>
><br>
> I have applyed the contour filter on a dataset with isosurface Temp and I<br>
> want to calculate the gradient of a variable Temp on the combustion dataset<br>
> and use the magnitude of the gradient as a color map for the Temp isosurface<br>
><br>
> how can I do that ?<br>
><br>
><br>
> Thanks<br>
><br>
><br>
> ---------------------------<br>
><br>
> Best Regards,<br>
> Roba<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at:<br>
> <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
><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>