I created a python table reader using the VTKPythonAlgorithmBase and @smproxy.reader.
From the standard functions I implemented SetFileName, GetTimestepValues, GetDataArraySelection, RequestInformation and RequestData similarly as in the example csv reader.
My question is how can I extend the reader to support the multiblock structure. My reader reads data from different parts of the model and I would like these parts to be selectable in the Multi block inspector. Unfortunatelly I did not find a documentation, guide or example on how to implement such functionality.
Can you elaborate, please? Are you thinking toggling of “visibility” of blocks? In this case, the reader will read all blocks, but what’s shown in the view can be changed in the UI. In that case, multiblock-inspector makes sense. In fact, it should work automatically. When showing the data in spreadsheet view, you should be able to toggle visibility from the Multiblock Inspector.
If you want the reader to not read certain blocks, you need to use
vtkDataArraySelection similar to how array selection is handled to provide the list of names of the blocks and then use the user specified choices in the RequestData implementation to read/skip blocks. See
vtkIossReader for how it uses
vtkDataArraySelection to manage block visibility.
Showing of full hierarchy of blocks on the Properties panel is currently not supported, but it is something that we will support in near future.
sorry for the delayed anwer.
The issue was working with a reader of type vtkMultiBlockDataSet in general. It was hard to find any documentation / example regarding this approach. In the end we found something and were able to produce a working code, so I guess that this ticket can be closed.
I do not want to mark my own anwer as solution, as it is not a solution. Is there another way to close the ticket?