Skip to content

Instantly share code, notes, and snippets.

@agramfort
Created March 25, 2014 22:35
Show Gist options
  • Save agramfort/9772976 to your computer and use it in GitHub Desktop.
Save agramfort/9772976 to your computer and use it in GitHub Desktop.
import numpy as np
from mayavi import mlab
from surfer import Brain
import mne
from mne.datasets import sample
data_path = sample.data_path()
subjects_dir = data_path + '/subjects'
brain = Brain('sample', 'rh', 'inflated', subjects_dir=subjects_dir)
surf = brain._geo
vertices = mne.source_estimate.grade_to_vertices('sample', 5,
subjects_dir=subjects_dir)
vertidx = vertices[1]
mlab.points3d(surf.x[vertidx], surf.y[vertidx],
surf.z[vertidx], color=(1, 1, 0), scale_factor=1.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment