Question on Programmable Filter using vtkPythonAlgorithmBase

Hi, I have read many post from others earlier and it helped me a lot. I have a question that probably hasn’t asked earlier.

I am using separate python script using vtkPythonAlgorithmBase and loading it through Manage Plugins menu, then using it as a filter on my dataset.

Within script, I am creating vtkStreamTracer and getting it’s output, storing it in vtkPolyData object. It’s works perfectly.

I have couple of questions:

  1. How do I change ‘Display’ properties such as LineWidth of the output object in Paraview pipeline from script only? I have tried using functions from paraview.simple within RequestData() function of the script. Unfortunately it goes into infinite recursion where RequestData() calls itself, probably because some functions updates/accesses pipeline objects. I have made a macro to style my Stream Lines after I apply this filter. But I want it to be done within one step: creation of final output Stream Lines and styling of it.
  2. Is some of the functions aren’t available in vtkPythonAlgorithm? Like vtkProgrammableFilter is available but not vtkPythonProgrammableFilter.

You cannot modify the visualization from inside a filter:

  • a plugin defines the filter contents
  • a macro uses the filter and defines the display.

To have a one-step workflow, you can have a macro that creates your filter and configures its display.

Oh, I see. Thanks.