PyVista: 3D plotting and mesh analysis through a streamlined interface for the Visualization Toolkit (VTK)

Summary There are several options for 3D visualization in Python, a few notable projects include Matplotlib

Plotting VTK datasets using only the VTK Python package or a similar visualization library is often an ambitious programming endeavor.Reading a VTK supported file and plotting it requires a user to write a complicated sequence of routines to render the data object while having to remember which VTK classes to use for file reading and dataset mapping.PyVista includes plotting routines that are intended to be intuitive and highly controllable with syntax and keyword arguments similar to Matplotlib (Hunter, 2007).These plotting routines are defined to make the process of visualizing spatially referenced data straightforward and easily implemented by novice programmers; streamlining the process for creating integrated scenes like that shown in Figure 1.
VTK implements an object-oriented approach to 3D visualization (Schroeder et al., 2006), and PyVista adheres to that underlying structure to provide an API that expands on VTK's data types.These expanded, wrapped types hold methods and attributes for quickly accessing scalar arrays, inspecting properties of the dataset, or using filtering algorithms to transform datasets.PyVista wrapped objects have a suite of common filters ready for immediate use directly on the objects.These filters are commonly used algorithms in the VTK library that have been made more accessible by binding a method to control that algorithm directly onto all PyVista datasets, providing a shared set of functionality.Through the use of these bound filtering methods, powerful VTK algorithms can be leveraged and controlled via keyword arguments designed to be intuitive for novice users.
At its core, PyVista is a pure Python helper module for VTK that interfaces back to VTK data objects through NumPy (Ascher et al., 2001) and direct array access adhering to VTK's object-oriented approach to 3D visualization (Schroeder et al., 2006).The PyVista Python package provides an accessible and intuitive interface back to the VTK library to facilitate rapid prototyping, analysis, and visual integration of spatially referenced datasets.
Figure 1 demonstrates an integrated scene of geospatial data generated by PyVista; to learn more about how this visualization was created, please visit PVGeo's FORGE project website (forge.pvgeo.org).

Figure 1 :
Figure 1: A visually integrated scene of geospatial data (FORGE Geothermal Site).This rendering includes a digital land surface with overlain satellite imagery and geologic map, a subsurface temperature model, scattered points of the sampled temperature values, geophysical well logging data, GIS site boundary, and interpreted faulting surfaces.