GetBounds() for vtkMultiBlockDataSet in Programmable Filter

I have a vtkMultiBlockDataSet and I need to get its bounds in the programmable filter.

For single block data I was able to use GetBounds() but that does not seem to work for vtkMultiBlockDataSet.

Instead, I get the following error:
Screenshot from 2022-06-22 02-08-02

I have tried to figure out what arguments GetBounds() needs, but I did not find the help very useful.

Apparently GetBounds() needs a list of six floats, but which ones?
Could anyone give me a hint?

I think in C++ you would pass an empty double[6] variable in the function call where the bounds information would be saved. It’s C++ specific and not relevant for Python.

As for your problem, a multi-block dataset can have several blocks and each block can have its own bounds, so it makes sense that GetBounds doesn’t work for the whole dataset. You could try first extracting a single block using the ExtractBlock filter, and then apply GetBounds to that. If that doesn’t work, try also MergeBlocks on the ExtractBlock.

I disagree. I think it makes sense to provide overall bounds for the bounding box.
And these bounds are printed in the Information tab as well!

Sure, one can iterate over the different blocks like so,

for ind, (block_in, block_out) in enumerate(zip(inputs[0], output)):
    bounds = block_in.GetBounds()

and then combine the individual bounds via min and max operations.

But the Information tab already prints the total bounds, so they are computed anyway, so why not have vtkMultiBlockDataSet’s GetBounds() function return those overall bounds.

Instead there is a function GetBounds() defined and it does not work.