Skip to main content

3D visualization for the Open Mining Format (omf)

Project description

Documentation Status PyPI Build Status Linux Build Status Windows https://codecov.io/gh/OpenGeoVis/omfvista/branch/master/graph/badge.svg GitHub

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 pyvista 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 pyvista
import omfvista

project = omfvista.load_project('test_file.omf')
project
Table Representation

Once the data is loaded as a pyvista.MultiBlock dataset from omfvista, then that object can be directly used for interactive 3D visualization from pyvista:

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 pyvista to the volumetric data:

thresher = pyvista.Threshold(vol)
IPython Thresholding Tool

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()
Interactive Rendering

And once you like what the render view displays, you can save a screenshot:

p.screenshot('wolfpass.png')
Wolf Pass Screenshot

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omfvista-0.2.0.tar.gz (7.7 kB view details)

Uploaded Source

File details

Details for the file omfvista-0.2.0.tar.gz.

File metadata

  • Download URL: omfvista-0.2.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.14

File hashes

Hashes for omfvista-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2d9cac9e2445c96e29d7238cf5737ced4e24aefa36b6f99c46f84260a44b394b
MD5 0b624f52565fc353f8fc843d714de662
BLAKE2b-256 88f5f3fef938bc18024387e873623b7446c807dda5219c30faf3877b0f4ebb62

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page