3D visualization for the Open Mining Format (omf)
Project description
A VTK interface for the Open Mining Format package (omf) providing Python 3D visualization.
Installation
Installation is simply:
pip install omfvista
All necessary dependencies will be installed alongside omfvista. Please note that this package heavily leverages the vista package.
Questions & Support
For general use questions, please join @OpenGeoVis on our Slack workspace under the #omfvista channel. To inquire with the creators of omfvista, please email info@opengeovis.org.
Example Use
Be sure to check out the Example Notebook that demos omfvista! Here’s an example using the sample data hosted in the OMF repository.
import vista
import omfvista
project = omfvista.load_project('test_file.omf')
project
Once the data is loaded as a vista.MultiBlock dataset from omfvista, then that object can be directly used for interactive 3D visualization from vista:
project.plot(notebook=False)
Or an interactive scene can be created and manipulated to create a compelling figure directly in a Jupyter notebook. First, grab the elements from the project:
# Grab a few elements of interest and plot em up!
vol = project['Block Model']
assay = project['wolfpass_WP_assay']
topo = project['Topography']
dacite = project['Dacite']
Then apply a filtering tool from vista to the volumetric data:
thresher = vista.Threshold(vol)
Then you can put it all in one environment!
# Grab the active plotting window
# from the thresher tool
p = thresher.plotter
# Add our datasets
p.add_mesh(topo, cmap='gist_earth', opacity=0.5)
p.add_mesh(assay, color='blue', line_width=3)
p.add_mesh(dacite, color='yellow', opacity=0.6)
# Add the bounds axis
p.show_bounds()
And once you like what the render view displays, you can save a screenshot:
p.screenshot('wolfpass.png')