discretize.mixins.vtkModule
¶
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.
The discretize.mixins.vtkModule.vtkInterface
class becomes inherrited
by all mesh objects and allows users to directly convert any given mesh by
calling that mesh’s toVTK()
method
(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 vtki
(see vtki docs)
which provides a direct interface to the VTK software library through accesible
Python data structures and NumPy arrays:
pip install vtki
By default, the toVTK()
method will return a vtki
data object so that
users can immediately start visualizing their data in 3D.
See vtki demo for an example of the types of integrated visualizations that are possible leveraging the link between discretize, vtki, and PVGeo:

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
Classes
discretize.mixins.vtkModule.vtkInterface |
This class is full of methods that enable discretize meshes to be converted to VTK data objects (and back when possible). |
discretize.mixins.vtkModule.vtkTensorRead |
Provides a convienance method for reading VTK Rectilinear Grid files as TensorMesh objects. |
discretize.mixins.vtkModule.vtkXMLRectilinearGridReader |
vtkXMLRectilinearGridReader - Read VTK XML RectilinearGrid files. |
discretize.mixins.vtkModule.vtkXMLRectilinearGridWriter |
vtkXMLRectilinearGridWriter - Write VTK XML RectilinearGrid files. |
discretize.mixins.vtkModule.vtkXMLStructuredGridWriter |
vtkXMLStructuredGridWriter - Write VTK XML StructuredGrid files. |
discretize.mixins.vtkModule.vtkXMLUnstructuredGridWriter |
vtkXMLUnstructuredGridWriter - Write VTK XML UnstructuredGrid files. |
Functions
discretize.mixins.vtkModule.assignCellData (vtkDS) |
Assign the model(s) to the VTK dataset as CellData |