pyvista.Plotter.get_image_depth

pyvista.Plotter.get_image_depth#

Plotter.get_image_depth(
fill_value: float | None = nan,
reset_camera_clipping_range: bool = True,
) pyvista_ndarray[ソース]#

現在のレンダーウィンドウを表すDepth画像を返します.

バージョン 0.47 で変更: The last image depth is no longer autoatically stored. You must enable store_image_depth=True within Plotter.show() to obtain the image depth after the pyvista.Plotter has been closed.

パラメータ:
fill_valuefloat, default: numpy.nan

Fill value for points in image that do not include objects in scene. To not use a fill value, pass None.

reset_camera_clipping_rangebool, default: True

カメラのクリップ範囲をリセットしてビューにデータを含める.

戻り値:
pyvista.pyvista_ndarray

イメージプレーンに直交するカメラからの深度値のイメージ.

備考

Values in image_depth are negative to adhere to a right-handed coordinate system.

>>> import pyvista as pv
>>> pl = pv.Plotter()
>>> actor = pl.add_mesh(pv.Sphere())
>>> pl.show(store_image_depth=True)
../../../_images/pyvista-Plotter-get_image_depth-61df35fe924da5a4_00_00.png
>>> zval = pl.get_image_depth()