Skip to main content

3D visualization for the Open Mining Format (omf)

Project description

Documentation Status PyPI Build Status Linux Build Status Windows GitHub

A VTK interface for the Open Mining Format package (omf) providing Python 3D visualization.

Installation

Installation is simply:

pip install omfvtk

All necessary dependencies will be installed alongside omfvtk. Please note that this package heavily leverages the vtki package.

Example Use

Be sure to check out the Example Notebook that demos omfvtk! Here’s an example using the sample data hosted in the OMF repository.

import vtki
import omfvtk

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

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

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

thresher = vtki.Threshold(vol, display_params={'show_edges':False})
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', show_edges=False, opacity=0.5)
p.add_mesh(assay, color='blue', line_width=3)
p.add_mesh(dacite, show_edges=False, color='yellow', opacity=0.6)
# Add the bounds axis
p.add_bounds_axes()
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

omfvtk-0.0.7.tar.gz (7.6 kB view details)

Uploaded Source

File details

Details for the file omfvtk-0.0.7.tar.gz.

File metadata

  • Download URL: omfvtk-0.0.7.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/2.7.14

File hashes

Hashes for omfvtk-0.0.7.tar.gz
Algorithm Hash digest
SHA256 447d5c36b72c41e11f14258bac92881672eb313f038f1a98a02ceb0b029c7ad8
MD5 1771692b3d8ee3b77f1ca7865a76f9b5
BLAKE2b-256 b850daffb46f3b1c0fa71ee04cb67454498033ba14ed6d9acb91dd59869dd4ba

See more details on using hashes here.

Provenance

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