[Paraview] Contour filter isosurface value and coloring in Catalyst

Sean Ziegeler sean.ziegeler at nrlssc.navy.mil
Fri May 24 16:55:53 EDT 2013


In Catalyst, it might be possible to extract the final result from the 
PythonCalculator as a simple variable.  I would think it would allow 
that.  I'm wondering if maybe Y is bound as some sort of VTK object 
rather than a simple Python variable.  I know when you're doing 
traditional Python scripting with ParaView, on a client, the results 
from a filter are actually encapsulated in a proxy, and you have to 
explicitly request the results be sent from the server to the client. 
This is to keep you from inadvertently initiating the transfer of some 
huge array from the server to the client.  In this case, the "array" is 
a single value from the Python Calculator.  If you can figure that part 
out, it would be the easiest way to do it.

If not, another way would be to use a Programmable Filter inside your 
Catalyst script.  The Programmable Filter would implement a 
PythonCalculator to get the min, then a Contour filter with the result 
from the PythonCalculator as the threshold input.


On 05/23/13 16:12, Pettey . Lucas wrote:
> Hello,
>
> Is it possible to set the Isosurface value of the Contour filter to a variable? I want the contour to always be say 10% above the global minimum of a variable, lets call it X.
>
> My thought would be to use the PythonCalculator (... Expression='global_min(X)', ArrayName='Y', ...) and then set the Contour1=Contour(... Isosurfaces[1.10*Y] ... ), but the Catalyst script doesn't like this.
>
> Also, how can I color the contour according to a variable? The Catalyst script does allow the Contour.ColorAttributeType or Contour.ColorArrayName as Attributes.
>
> Right now, I have a script which generates a contour, but I have to fix the scalar value and then color it once I open the .pvtp file. Ideally, this would be done inside the script.
>
> Thanks
> Lucas
> ________________________________
> This electronic message transmission and any attachments that accompany it contain information from DRC® (Dynamics Research Corporation) or its subsidiaries, or the intended recipient, which is privileged, proprietary, business confidential, or otherwise protected from disclosure and is the exclusive property of DRC and/or the intended recipient. The information in this email is solely intended for the use of the individual or entity that is the intended recipient. If you are not the intended recipient, any use, dissemination, distribution, retention, or copying of this communication, attachments, or substance is prohibited. If you have received this electronic transmission in error, please immediately reply to the author via email that you received the message by mistake and also promptly and permanently delete this message and all copies of this email and any attachments. We thank you for your assistance and apologize for any inconvenience.
> _______________________________________________
> Powered by 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>


More information about the ParaView mailing list