General Utilities#
Context manager to temporarily catch VTK errors.  | 
|
  | 
Rotate points by angle about an axis.  | 
  | 
Check if a point is inside a set of bounds.  | 
  | 
Set a file to write out the VTK errors.  | 
Object Conversions or Wrapping#
  | 
Convert a vtk matrix to an array.  | 
  | 
Construct a cubemap from 6 images from a directory.  | 
  | 
Construct a cubemap from 6 images.  | 
  | 
Convert   | 
  | 
Return   | 
  | 
Convert a NumPy image array to a   | 
  | 
A ndarray which references the owning dataset and the underlying vtk array.  | 
  | 
Convert a   | 
  | 
Wrap any given VTK data object to its appropriate PyVista data object.  | 
Features#
  | 
Convert 3D Cartesian coordinates to spherical coordinates.  | 
  | 
Return information about a cell's quality measure.  | 
  | 
Create a uniform grid surrounding the given dataset.  | 
  | 
Create a structured grid from arrays of spherical coordinates.  | 
  | 
Merge several datasets.  | 
  | 
Return the implicit function that implements Perlin noise.  | 
  | 
Compute the principal axes of a set of points.  | 
  | 
Sample an implicit function over a structured point set.  | 
  | 
Convert Spherical coordinates to 3D Cartesian coordinates.  | 
  | 
Transform vectors from spherical (r, phi, theta) to cartesian coordinates (z, y, x).  | 
  | 
Voxelize mesh to UnstructuredGrid.  | 
  | 
Voxelize mesh to create a RectilinearGrid voxel volume.  | 
File IO#
  | 
Convert a   | 
  | 
Extract the extension of the filename.  | 
  | 
Test if passed object is instance of   | 
  | 
Read any file type supported by   | 
  | 
Read an ExodusII file (  | 
  | 
Read a GRDECL file (  | 
  | 
Read any mesh file using meshio.  | 
  | 
Load a texture from an image file.  | 
  | 
Save mesh to file using meshio.  | 
  | 
Set the format used to serialize   | 
  | 
Set any vtk writer to write as binary or ascii.  | 
  | 
Convert a PyVista mesh to a   | 
Mesh Creation#
  | 
Define types of cells.  | 
  | 
Fit a line to points using its   | 
  | 
Fit a plane to points using its   | 
  | 
Make a connected line set given an array of points.  | 
  | 
Create a pyvista.PolyData object composed of vectors.  | 
  | 
Convert numpy array or array-like to a vtkPoints object.  | 
Array Access#
  | 
Return cell array of a pyvista or vtk object.  | 
  | 
Convert a NumPy array to a vtkDataArray or vice versa.  | 
  | 
Return field data of a pyvista or vtk object.  | 
  | 
Search point, cell and field data for an array.  | 
  | 
Return point array of a pyvista or vtk object.  | 
Transformations#
  | 
Describes linear transformations via a 4x4 matrix.  | 
Image Comparison and Regression#
  | 
Compare two different images of the same size.  | 
Colors#
  | 
Helper class to convert between different color representations used in the pyvista library.  | 
Any object convertible to a   | 
Named colors supported by Color, Plotter,
and other plotting-related methods:
Named colormaps supported by LookupTable, Plotter,
and other plotting-related methods:
Miscellaneous#
  | 
Set a new attribute for this object.  | 
Context manager to control setting new attributes on PyVista classes.  | 
|
  | 
Start the virtual framebuffer Xvfb.  | 
  | 
Generate a PyVista software environment report.  | 
Context manager to set VTK verbosity level.  | 
|
Context manager to control access to VTK's pythonic snake_case API.  | 
PyVista Version Information#
The PyVista library provides a way of getting the version installed in your environment.
>>> # Output the version of PyVista.
>>> import pyvista
>>> pyvista.version_info
(0, 44, 0)
VTK Version Information#
The PyVista library is heavily dependent on VTK and provides an easy way of getting the version of VTK in your environment.
>>> # 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