VTK/Paraview comes with a pretty nice information exchange system, based on the
vtkInformation
and vtkInformationKey
classes. In my own custom application, I would like to make use of it - if possible! -, instead of re-inventing one more wheel. I found this https://www.kitware.com/a-vtk-pipeline-primer-part-1/ to be a very helpful introduction into the subject.
1) information on the server side, down the pipeline
I have a source and an attached filter. The source produces a vtkTable
, and the filter takes it as input. From the outputInfo of the source, I am getting access to the vtkTable
object that I am supposed to fill with stuff, and from the inputInfo of the filter I can retrieve a pointer to a vtkTable
with the stuff that I filled in before.
Amazing: the pointers are NOT the same! Looks like the input table of the filter is indeed another table than the output of the source (just a “shallow copy” of it?).
Not any more so amazing: If I am adding some custom information item (key, data) to the information object of the output table of the source, I cannot retrieve that information item from the input table of the filter…
This looked like a good way to “send” some info from the source to the filter, but it does not work: Is there another way provided in the pipeline architecture logic?
2) Passing information from server to client side
I have a filter class that again takes a vtkTable
as input. Some of the properties are defined with their own domain, which is implemented in a vtkSM<domain>
class. This domain class has a IsFilteredArray()
function which receives an info object of vtkPVDataInformation
class, with lots of info about the input table.
I know that the filter class object sits on the server side, and the domain class object sits on the client side, and it is always tricky to pass information between the two, but Paraview
does a nice job of passing a nice little set of information about the table, including even the first 6 data rows - avoiding to push the entire data from the server to the client!
Again I would like to send some piece of custom information data from the server side to that domain function: Is there any way to do this within the software design logic of Paraview? Of course I can always “break the rules”, but with this, I am afraid to make things at the end even more complex…