pyvista.Plotter.get_image_depth#
- Plotter.get_image_depth( ) pyvista_ndarray[source]#
Return a depth image representing current render window.
Changed in version 0.47: The last image depth is no longer autoatically stored. You must enable
store_image_depth=TruewithinPlotter.show()to obtain the image depth after thepyvista.Plotterhas been closed.- Parameters:
- Returns:
pyvista.pyvista_ndarrayImage of depth values from camera orthogonal to image plane.
See also
Notes
Values in
image_depthare negative to adhere to a right-handed coordinate system.Examples
>>> import pyvista as pv >>> pl = pv.Plotter() >>> actor = pl.add_mesh(pv.Sphere()) >>> pl.show(store_image_depth=True)
>>> zval = pl.get_image_depth()