

The Programmable Filter & Source also have Script properties.

Through a neat trick in the server manager xml language, you can declare custom properties that will appear in the properties panel using standard property value entry widgets. You can read all about that on the Plugin HowTo wiki page. An XLM plugin is an xml file that describes one-or-more filters using the ParaView server manager xml language. ParaView can load filters from XML plugins. Visit that page to find many more example filters and sources. I took this example from the Python Programmable Filter wiki page. In Figure 1., I've used the Double Helix programmable source example and created a custom property panel for it. You can download that from the ParaView downloads page under the section titled Nightly Builds. Python Programmable Filter with a Custom Property PanelĪha! Well, it turns out that you can customize the programmable filter's property panel, but you've got to use the development version of ParaView, or any version of ParaView newer than 4.0.1.
#Paraview python filters how to
This blog post will show you how to hide the Python implementation details to make the programmable filter easier to use.įigure 1. Most users want to adjust the filter by setting filter property values, not by editing Python source code. However, the Programmable Filter interface presented in the property panel is not user friendly because there is no way to hide the Python implementation details. You can use the convenient features of the standard Python library, and use NumPy to perform fast, vectorized operations on VTK data arrays. Developing filters with Python has several advantages– it's fast to prototype and easy to share, since there's no compiled code. The Python Programmable Filter is a powerful tool for data analysis in ParaView, as it enables you to implement ParaView readers and filters using Python.
