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
Instead, I get the following error:
I have tried to figure out what arguments
GetBounds() needs, but I did not find the help very useful.
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 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, output)):
bounds = block_in.GetBounds()
and then combine the individual bounds via
But the Information tab already prints the total bounds, so they are computed anyway, so why not have
GetBounds() function return those overall bounds.
Instead there is a function
GetBounds() defined and it does not work.