[Solved] Detect which fields/input were not changed


I am using vtk with paraview (but maybe without my question still has some meaning). I have a filter with let’s say a big distance matrix input and a small integer other parameter as a field.
My case is the following : sometimes I will only modify the small parameter (in a field) and not the distance matrix input. If the small parameter only is modified, I can avoid redoing some heavy computation involving the distance matrix.

But I do not know how, when RequestData is called, to detect which parameters were changed and which were not. I could hash my distance matrix and compare the new hash with the old one (which I would have stored) and detect changes this way.
But maybe vtk has a native way to give me this piece of information?

Thanks in advance for your help,

Well, actually I got the answer quickly so I share it there.

Suppose I have a field parameter named toto, then when its value is actually changed and then the “apply” button is clicked (in paraview), the function SetToto is called.
So I can modify some boolean variable telling whether or not I should recompute everything there. And then RequestData will be called later and will take that into account.
Another precision: one should called the “Modified()” function inside the SetToto function (if not, RequestData will not be called this time).