Skip to content

Latest commit

 

History

History
70 lines (44 loc) · 1.76 KB

README.rst

File metadata and controls

70 lines (44 loc) · 1.76 KB

omfvtk

Documentation Status

PyPI

Build Status

GitHub

A VTK interface for the Open Mining Format package (omf).

Example Use

Use the wraper provided in omfvtk to wrap any omf data object:

import omfvtk

omfvtk.wrap(data)

Here's an example using the sample data hosted in the OMF repository.

import omf
import omfvtk

# Read all elements
reader = omf.OMFReader('test_file.omf')
project = reader.get_project()

# Iterate over the elements and add converted VTK objects to dictionary:
data = dict()
for e in project.elements:
    d = omfvtk.wrap(e)
    data[e.name] = d

Or better yet, just use the project loader:

import omfvtk
data = omfvtk.load_project('test_file.omf')

Credits

This package was created with Cookiecutter and the banesullivan/cookiecutter-gendocs project template.