# zmax from GetDataInformation().GetBounds() is wrong

**URL:** https://discourse.paraview.org/t/zmax-from-getdatainformation-getbounds-is-wrong/8135
**Category:** ParaView Support
**Created:** [October 6, 2021, 7:07pm UTC](https://discourse.paraview.org/t/zmax-from-getdatainformation-getbounds-is-wrong/8135 "2021-10-06T19:07:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![TimJim](https://discourse.paraview.org/user_avatar/discourse.paraview.org/timjim/32/1270_2.png) [@TimJim](https://discourse.paraview.org/u/TimJim)
#### Post date: [October 6, 2021, 7:07pm UTC](https://discourse.paraview.org/t/zmax-from-getdatainformation-getbounds-is-wrong/8135/1 "2021-10-06T19:07:23Z")

</div>

Hi, hope I’m not missing anything simple but is there anything one should call on an object before running `GetDataInformation().GetBounds()` in pvpython on an object?

In the GUI when you do a box clip, if you hit `Reset Bounds`, the Box Parameters seem to give the bounds of the object, but for some reason, in pvpython the `zmax` bound does not match. (`xmin`, `xmax`, `ymin`, `ymax`, and `zmin` match that in the GUI, however.)

For example, for this file:  
In the GUI, I get:

 ![image](https://discourse.paraview.org/uploads/default/original/2X/3/32a2bfea1905f4e050aabd178b5e7753721167a5.png)

but using pvpython:

 ![image](https://discourse.paraview.org/uploads/default/original/2X/1/13583fd1d5410f8be5288a8941d14fade77f24a6.png)

I also tried running `Show(surface_flow, RenderView)` before getting the bounds but it still gets `zmax` wrong for some reason. I’d appreciate any advice! Thanks.

EDIT:  
Forgot to add the sample dataset: [surface\_flow\_0.vtu](https://drive.google.com/file/d/15OftxGAl2hwp84CjgYlvvVBNw23ZNHX_/view?usp=sharing)

---

<div class="post-metadata">

### Author: ![bastian](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bastian/32/7513_2.png) [@bastian](https://discourse.paraview.org/u/bastian)
#### Post date: [October 7, 2021, 7:05am UTC](https://discourse.paraview.org/t/zmax-from-getdatainformation-getbounds-is-wrong/8135/2 "2021-10-07T07:05:06Z")

</div>

I don’t see any discrepancy:  
zmax-zmin = 3.0477-(-7.8752) = 10.9229 = Length

You can check the bounds in the information tab of the reader object without the need for a clip filter.

---

<div class="post-metadata">

### Author: ![TimJim](https://discourse.paraview.org/user_avatar/discourse.paraview.org/timjim/32/1270_2.png) [@TimJim](https://discourse.paraview.org/u/TimJim)
#### Post date: [October 7, 2021, 7:54am UTC](https://discourse.paraview.org/t/zmax-from-getdatainformation-getbounds-is-wrong/8135/3 "2021-10-07T07:54:51Z")

</div>

Hi @bastian - thank you! I was thinking of the box in terms of min and max by accident, you’re completely right… The ‘length’ label should have been an immediate giveaway. A bit embarrassed to say I don’t know why that didn’t occur to me last night! Cheers.
