PySurfer

From Brede Wiki
Jump to: navigation, search
Software (help)
PySurfer
Description: Python progarm to visualization of cortical surfaces
Developer: Michael Waskom
Language: Python
License: BSD
Parent(s): Python , FreeSurfer
Link: http://pysurfer.github.com/
Database(s):
Feature(s): Neuroimaging visualization

PySurfer is a Python program for visualization of cortical surfaces from the FreeSurfer program. It is available from:

https://pysurfer.github.io/

It is also available from PyPI.

PySurfer relies in Nibabel and Mayavi. Since 2014 it has been planned to migrate to Vispy (Mayavi presently does not support Python 3).[1]

The developers are:

PySurfer uses files in the format of FreeSurfer. I shows, e.g., inflated FreeSurfer files in a 3D visualization environment where the model can be rotated. The surface can be modified to show contours and colored and foci can be added.

PySurfer is a fairly small package with just over 3600 lines.

Contents

[edit] Python

[edit] Basic plotting

With MNE sample data set downloaded to a directory ('~/data/mne/) and modifying the basic plotting example at:

https://pysurfer.github.io/examples/plot_basics.html
import os
from os.path import expanduser
import mayavi.mlab
from surfer import Brain
 
os.environ['SUBJECTS_DIR'] = expanduser('~/data/mne/MNE-sample-data/subjects/')
 
brain = Brain(subject_id='fsaverage', hemi='lh', surf='inflated')
mayavi.mlab.show()

[edit] Related software

  1. MNE
  2. NiBabel
  3. Pycortex
  4. SCoT

[edit] References

  1. https://github.com/nipy/PySurfer/issues/106
Personal tools