pyvista.ImageData#
- class ImageData(*args, **kwargs)[ソース]#
3つの座標方向に均一な間隔でデータセットをモデル化します.
いくつかの方法の1つで初期化できます:
空のグリッドを作成
vtkImageData オブジェクトから初期化します
寸法,セル間隔,原点に基づいて初期化します.
バージョン 0.33.0 で変更: 最初の引数には,パスまたは vtkImageData を指定します.キーワード引数を使って,ユニフォーム・グリッドの寸法,間隔,および原点を指定します.
バージョン 0.37.0 で変更:
dimsパラメータはdimensionsに名称が変更されました.- パラメータ:
- uinput
str| vtkImageData |ImageData,optional ユニフォームグリッドを初期化するためのファイル名またはデータセット. 設定されている場合,残りの引数は無視されます.
- dimensionssequence[
int],optional dimensionsof the uniform grid.- spacingsequence[
float], default: (1.0, 1.0, 1.0) spacingof the uniform grid in each dimension. Must be positive.- originsequence[
float], default: (0.0, 0.0, 0.0) originof the uniform grid.- deepbool, default:
False vtkImageData オブジェクトをディープコピーするかどうかを指定します.キーワードのみ.
- direction_matrix
RotationLike,optional The
direction_matrixis a 3x3 matrix which controls the orientation of the image data.Added in version 0.45.
- offset
int|VectorLike[int], default: (0, 0, 0) The offset defines the minimum
extentof the image. Offset values can be positive or negative. In physical space, the offset is relative to the image'sorigin.Added in version 0.45.
- validatebool |
str| sequence[str], default:False Validate the mesh using
validate_mesh()after initialization. Set this toTrueto validate all fields, or specify any combination of fields allowed byvalidate_mesh.Added in version 0.47.
- uinput
参考
例
空の ImageData を作成
>>> import pyvista as pv >>> grid = pv.ImageData()
vtkImageData オブジェクトから初期化します.
>>> import vtk >>> vtkgrid = vtk.vtkImageData() >>> grid = pv.ImageData(vtkgrid)
グリッドの寸法とデフォルトの間隔と原点だけを使って初期化します.これらはキーワード引数でなければなりません.
>>> grid = pv.ImageData(dimensions=(10, 10, 10))
寸法と間隔を使って初期化します.
>>> grid = pv.ImageData( ... dimensions=(10, 10, 10), ... spacing=(2, 1, 5), ... )
寸法,間隔,原点を使って初期化します.
>>> grid = pv.ImageData( ... dimensions=(10, 10, 10), ... spacing=(2, 1, 5), ... origin=(10, 35, 50), ... )
別のImageDataから初期化します.
>>> grid = pv.ImageData( ... dimensions=(10, 10, 10), ... spacing=(2, 1, 5), ... origin=(10, 35, 50), ... ) >>> grid_from_grid = pv.ImageData(grid) >>> grid_from_grid == grid True
メソッド#
この均一なグリッドを直線格子にキャストします. |
|
この均一な格子を構造化格子にキャストします. |
|
|
4面体メッシュの構造化グリッドを作成します. |
アトリビュート#
アクティブな法線を配列で返します. |
|
アクティブなスカラーを配列で返します. |
|
アクティブなスカラーの関連付けと名前を返します. |
|
アクティブなスカラーの名前を返します. |
|
アクティブなテンソル配列を返します. |
|
アクティブなテンソルのフィールドと名前を取得します: [field, name]. |
|
アクティブなテンソル配列の名前を返します. |
|
ポイント上のアクティブなテクスチャ座標を返します. |
|
アクティブなベクトル配列を返します. |
|
アクティブなベクトルの関連付けと名前を返します. |
|
アクティブなベクトル配列の名前を返します. |
|
データセットオブジェクトの実際のサイズを返します. |
|
2Dの場合,メッシュの面積を返します. |
|
データセットの配列名のリストを返します. |
|
アクティブなベクトルデータのグリフ表現を矢印で返します. |
|
このデータセットの境界ボックスを返します. |
|
Return the size of each axis of the object's bounding box. |
|
すべてのセルを簡単にループさせる方法を提供するジェネレーター. |
|
DataSetAttributesとしてセルデータを返します. |
|
read-only, calls GetCellGhostArray |
|
read-only, calls GetCellTypes |
|
read-only, calls GetCellTypesArray |
|
read-only, calls GetCells |
|
Set or return the center of the bounding box. |
|
read-only, calls GetClassName |
|
read-only, calls GetDataDescription |
|
read-only, calls GetDataDimension |
|
read-only, calls GetDataObjectType |
|
read-only, calls GetDataReleased |
|
read-write, calls GetDebug/SetDebug |
|
Return the number of spatial dimensions spanned by this dataset's points. |
|
グリッドの大きさを返します. |
|
Set or get the direction matrix. |
|
Return the set of distinct cell types in this dataset. |
|
ImageDataの範囲を返すか設定します. |
|
read-only, calls GetExtentType |
|
DataSetAttributesとしてFieldData を返します. |
|
read-write, calls GetGlobalReleaseDataFlag/SetGlobalReleaseDataFlag |
|
read-write, calls GetGlobalWarningDisplay/SetGlobalWarningDisplay |
|
Return True if the mesh contains any non-linear cells. |
|
read-only, calls GetIncrements |
|
Return or set 4x4 matrix to transform index space (ijk) to physical space (xyz). |
|
read-write, calls GetInformation/SetInformation |
|
Return |
|
read-only, calls GetIsInMemkind |
|
境界ボックスの対角線の長さを返します. |
|
read-only, calls GetLength2 |
|
read-only, calls GetMTime |
|
Return the maximum spatial dimensionality of all cells in this mesh. |
|
read-only, calls GetMaxCellSize |
|
read-only, calls GetMaxSpatialDimension |
|
write-only, calls SetMemkindDirectory |
|
基盤となるVTK C++オブジェクトのアドレスを返します. |
|
read-only, calls GetMeshMTime |
|
Get the minimum spatial dimensionality of all cells in this mesh. |
|
read-only, calls GetMinSpatialDimension |
|
データセット内に存在する配列の数を返します. |
|
データセット全体のセル数を返します. |
|
データセット全体の点の数を返します. |
|
セルの数を返します. |
|
点の数を返します. |
|
read-only, calls GetNumberOfScalarComponents |
|
read-only, calls GetObjectDescription |
|
read-write, calls GetObjectName/SetObjectName |
|
Return or set the index offset of the ImageData. |
|
グリッドの原点(南西下角)を返します. |
|
Return or set 4x4 matrix to transform from physical space (xyz) to index space (ijk). |
|
DataSetAttributesとしてポイントデータを返します. |
|
read-only, calls GetPointGhostArray |
|
暗黙的に定義されたポイントのコピーを,数値配列として作成します. |
|
read-write, calls GetReferenceCount/SetReferenceCount |
|
read-only, calls GetScalarPointer |
|
read-only, calls GetScalarRange |
|
read-only, calls GetScalarSize |
|
read-only, calls GetScalarType |
|
read-only, calls GetScalarTypeMax |
|
read-only, calls GetScalarTypeMin |
|
各軸方向の間隔を返すか設定します. |
|
read-only, calls GetUpdateTime |
|
ユーザー指定のデータ辞書を設定または返します。 |
|
read-only, calls GetUsingMemkind |
|
メッシュボリュームを返します. |
|
すべてのXポイントを返します. |
|
すべてのYポイントを返します. |
|
すべてのZポイントを返します. |