一般ユーティリティ#

core.utilities.VtkErrorCatcher([...])

VTKエラーを一時的にキャッチするためのコンテキストマネージャ.

core.utilities.axis_rotation(points, angle)

軸を中心に角度をつけて点を回転させます.

core.utilities.is_inside_bounds(point, bounds)

ポイントが境界のセット内にあるかどうかをチェックします.

core.utilities.set_error_output_file(filename)

VTKエラーを書き出すファイルを設定します.

オブジェクトの変換やラッピング#

array_from_vtkmatrix(matrix)

vtkの行列を配列に変換します.

cubemap([path, prefix, ext])

ディレクトリにある6枚の画像からキューブマップを構築します.

cubemap_from_filenames(image_paths)

6つのイメージからキューブマップを作成します.

image_to_texture(image)

pyvista.ImageDatapyvista.Texture に変換します.

is_pyvista_dataset(obj)

ObjectがPyVistaでラップされたデータセットである場合, True を返します.

numpy_to_texture(image)

NumPy画像配列を pyvista.Texture に変換します.

pyvista_ndarray(array[, dataset, association])

所有するデータセットとその下にあるvtkArrayを参照するためのndarrayです.

vtkmatrix_from_array(array)

numpy.ndarray や配列状のものをvtk行列に変換します.

wrap(dataset)

与えられたVTKデータオブジェクトを適切なPyVistaデータオブジェクトにラップします.

Features#

cartesian_to_spherical(x, y, z)

3Dデカルト座標を球座標に変換します.

create_grid(dataset[, dimensions])

与えられたデータセットを囲む均一なグリッドを作成します.

grid_from_sph_coords(theta, phi, r)

球座標の配列から構造化グリッドを作成します.

merge(datasets[, merge_points, ...])

複数のデータセットをマージします.

perlin_noise(amplitude, freq, phase)

Perlin ノイズを実装する暗黙の関数を返します.

principal_axes(points, *[, return_std])

Compute the principal axes of a set of points.

sample_function(function[, bounds, dim, ...])

構造化された点セット上の陰関数をサンプルします.

spherical_to_cartesian(r, phi, theta)

球座標を3Dデカルト座標に変換する.

transform_vectors_sph_to_cart(theta, phi, r, ...)

球面座標 (r, phi, theta) からデカルト座標 (z, y, x)にベクトルを変換します.

voxelize(mesh[, density, check_surface, ...])

メッシュをUnstructuredGrid. にボクセライズします.

voxelize_volume(mesh[, density, ...])

メッシュをボクセル化して,RectilinearGridボクセルボリュームを作成します.

ファイルIO#

from_meshio(mesh)

Convert a meshio mesh instance to a PyVista mesh.

get_ext(filename)

Extract the extension of the filename.

is_meshio_mesh(obj)

Test if passed object is instance of meshio.Mesh.

read(filename[, force_ext, file_format, ...])

vtkmeshio でサポートされている任意のファイルタイプを読み込みます.

read_exodus(filename[, animate_mode_shapes, ...])

ExodusIIファイルを読み込みます('.e' または '.exo' ).

read_grdecl(filename[, elevation, ...])

Read a GRDECL file ('.GRDECL').

read_meshio(filename[, file_format])

Read any mesh file using meshio.

read_texture(filename[, progress_bar])

画像ファイルからテクスチャを読み込みます.

save_meshio(filename, mesh[, file_format])

meshioを使用してメッシュをファイルに保存します.

set_pickle_format(format)

Set the format used to serialize pyvista.DataObject when pickled.

set_vtkwriter_mode(vtk_writer[, use_binary])

Set any vtk writer to write as binary or ascii.

to_meshio(mesh)

Convert a PyVista mesh to a meshio mesh instance.

メッシュ作成#

CellType(value[, names, module, qualname, ...])

セルの種類を定義します.

fit_line_to_points(points, *[, resolution, ...])

Fit a line to points using its principal_axes().

fit_plane_to_points(points[, return_meta, ...])

Fit a plane to points using its principal_axes().

lines_from_points(points[, close])

点の配列を指定して,接続された線分セットを作成します.

vector_poly_data(orig, vec)

ベクトルで構成された pyvista.PolyData オブジェクトを生成.

vtk_points(points[, deep, force_float, ...])

numpy配列または配列のようなものを vtkPoints オブジェクトに変換します.

配列アクセス#

cell_array(obj, name)

pyvista か vtk オブジェクトのセル配列を返します.

convert_array(arr[, name, deep, array_type])

NumPy配列をvtkDataArrayに,またはその逆に変換します.

field_array(obj, name)

pyvista か vtk オブジェクトのフィールドデータを返します.

get_array(mesh, name[, preference, err])

配列の検索ポイント,セル,およびフィールドのデータ.

point_array(obj, name)

pyvista か vtk オブジェクトの点配列を返します.

Transformations#

Transform([trans, point, multiply_mode])

Describes linear transformations via a 4x4 matrix.

イメージの比較とレグレッション#

compare_images(im1, im2[, threshold, use_vtk])

同じサイズの2つの異なるイメージを比較します.

Colors#

Color([color, opacity, default_color, ...])

pyvista ライブラリで使用される異なる色表現間の変換を行うヘルパークラスです.

ColorLike

Color に変換できる任意のオブジェクトです.

Named colors supported by the Color class:

その他#

start_xvfb([wait, window_size])

バーチャルフレームバッファXvfbを起動します.

Report([additional, ncol, text_width, sort, gpu])

PyVistaソフトウェア環境レポートを作成します.

PyVistaバージョン情報#

PyVistaライブラリは、環境にインストールされているバージョンを取得する方法を提供します。

>>> # Output the version of PyVista.
>>> import pyvista
>>> pyvista.version_info
(0, 44, 0)

VTKバージョン情報#

PyVistaライブラリはVTKに大きく依存しており,あなたの環境にあるVTKのバージョンを簡単に取得する方法を提供します.

>>> # Output the version of VTK.
>>> import pyvista
>>> pyvista.vtk_version_info
VTKVersionInfo(major=9, minor=1, micro=0)
>>> # Get the major version of VTK
>>> pyvista.vtk_version_info.major
9