Custom filter/CPD - Event-Driven

Hi @utkarsh.ayachit,

My colleagues and I went to meet you a couple of months ago during Kitware’s training courses. We told you about our problem with our huge state files and how long it was taking during each update.

We are using custom filters (.CPD) to simplify the pipeline. We were wondering back then if it was possible to separate their update process :

  • execute inner “pipeline” only when the outer pipeline trigger the custom filter
  • the custom filter would use an event-driven pipeline


You told us that it was possible by doing some modification in our XML.

I have been looking through the LoadCustomProxyDefinitions logic and I don’t see anything related to this. So how do you transform the .cpd to be able to use an event-driven pipeline

Thank you.

I don’t follow. In a single threaded application, I don’t see the difference between “Current Version” and “Ideal concept”. What’s an “event driven pipeline”?

A custom filter is just wrapper for an inner pipeline(s). The end points in the inner pipeline are directly connected to the outer pipeline when the custom filter is instantiated in a regular ParaView pipeline.


in the “current version”, when you trigger apply on filter 4, it will verify filter 3 to see if it need to update its data, then it will verify 2,3 - 2,2 ,2.1 …

so if your custom filter is using multiple ( eg 10+ ), it will verify the 10+ inner filters.


In the outer pipeline we only see the "custom filter (2), therefore each time we are determining if it is required to update the data, we should only verify the outer layer. It should have a similar behavior to the programmable filter

programmable filter :

  • Has an “inner pipeline” created by the python script
  • each filter in our script aren’t doing anything validation to see if they need to be updated.
  • Outer layer decide if it needs to be updated

is it possible to create a custom filter that replicates the behavior of the programmable filter?


Ah! No, the custom filter cannot be used for that purpose. You should indeed use programmable filters, or custom vtkAlgorithm subclasses, or PythonAlgorithm (pv 3.6 onwards) based Python filters for that.