pyvista.ImageData.extent#
- property ImageData.extent: tuple[int, int, int, int, int, int][ソース]#
ImageDataの範囲を返すか設定します.
The extent is simply the first and last indices for each of the three axes. It encodes information about the image's
offset
anddimensions
.例
ImageData
を作成し,その範囲を表示します.>>> import pyvista as pv >>> grid = pv.ImageData(dimensions=(10, 10, 10)) >>> grid.extent (0, 9, 0, 9, 0, 9)
>>> grid.extent = (2, 5, 2, 5, 2, 5) >>> grid.extent (2, 5, 2, 5, 2, 5)
Note how this also modifies the grid's
offset
,dimensions
, andbounds
. Since we use default spacing of 1 here, the bounds match the extent exactly.>>> grid.offset (2, 2, 2)
>>> grid.dimensions (4, 4, 4)
>>> grid.bounds BoundsTuple(x_min=2.0, x_max=5.0, y_min=2.0, y_max=5.0, z_min=2.0, z_max=5.0)