This module provides a way for
discretize meshes to be
converted to VTK data objects (and back when possible) if the
VTK Python package is available.
discretize.mixins.vtkModule.InterfaceVTK class becomes inherrited
by all mesh objects and allows users to directly convert any given mesh by
calling that mesh’s
(note that this method will not be available if VTK is not available).
This functionality was originally developed so that discretize could be interoperable with PVGeo, providing a direct interface for discretize meshes within ParaView and other VTK powered platforms. This interoperablity allows users to visualize their finite volume meshes and model data from discretize along side all their other georeferenced datasets in a common rendering environment.
Another notable VTK powered software platforms is
pyvista (see pyvista docs)
which provides a direct interface to the VTK software library through accesible
Python data structures and NumPy arrays:
pip install pyvista
By default, the
to_vtk() method will return a
pyvista data object so that
users can immediately start visualizing their data in 3D.
Laguna del Maule Bouguer Gravity
This data scene is was produced from the Laguna del Maule Bouguer Gravity example provided by Craig Miller (see Maule volcanic field, Chile. Refer to Miller et al 2016 EPSL for full details.)
The rendering below shows several data sets and a model integrated together:
- Point Data: the Bouguer gravity anomalies
- Topography Surface
- Inverted Model: The model has been both sliced and thresholded for low values
||Provides a convienance method for reading VTK Rectilinear Grid files as
||This class is full of methods that enable
||vtkXMLRectilinearGridReader - Read VTK XML RectilinearGrid files.|
||vtkXMLRectilinearGridWriter - Write VTK XML RectilinearGrid files.|
||vtkXMLStructuredGridWriter - Write VTK XML StructuredGrid files.|
||vtkXMLUnstructuredGridWriter - Write VTK XML UnstructuredGrid files.|
||Assign the model(s) to the VTK dataset as CellData|