I am trying to write a programmable source which will update the range of a threshold when changing timesteps. Essentially what I want to do is plot the FWHM as an animation. I was looking back at a script I wrote for Paraview 4, but I thought I would give it a go for the latest version, and try using the paraview.simple module. However, I am getting stuck at the last line, where I need to shallow copy the data from the threshold to the sources output, as I get the error object has no attribute ‘GetOutput’ which I can see is the case from the paraview.simple documentation. However I am unsure which method I need to use instead!
Here is my script - there is a source called recon_* which I references specifically, which might not be the most portable way of doing it.
The script you are trying to build does not go in a Programmable Source (or Programmable Filter). ParaView UI scripts (those that use the paraview.simple bindings) are run from the Python Shell (View -> Python Shell) or bound to a macro.
These scripts do not have direct access to the data (unless you explicitly download it to the client, which is not a good idea). That is why GetOutput is not available. However, when a ParaView UI script creates a filter (like Threshold), it will be available in the Pipeline Browser, so its data will be available just like any other filter.