Skip to content

Instantly share code, notes, and snippets.

View oesteban's full-sized avatar
🦄

Oscar Esteban oesteban

🦄
View GitHub Profile
@oesteban
oesteban / mayavi&notebook.py
Created September 2, 2013 17:16
A short file to load an vtk and show a surface in iPython notebooks
from mayavi import mlab
from tvtk.api import tvtk
import numpy as np
surfname = os.path.join( model_path, 'fixed.csf.vtk' )
reader =tvtk.PolyDataReader( file_name=surfname )
mesh = reader.get_output()
reader.update()
# -*- coding: utf-8 -*-
# Author: Douglas Creager <[email protected]>
# This file is placed into the public domain.
# Calculates the current version number. If possible, this is the
# output of “git describe”, modified to conform to the versioning
# scheme that setuptools uses. If “git describe” returns an error
# (most likely because we're in an unpacked copy of a release tarball,
# rather than in a git working copy), then we fall back on reading the
# contents of the RELEASE-VERSION file.