Skip to content
Pycortex is a python-based toolkit for surface visualization in fMRI data
Python JavaScript C HTML C++ CSS KiCad
Find file
New pull request
Latest commit 4c08f7e @marklescroart marklescroart Merge pull request #139 from gallantlab/doc_update
Docs update to reflect broken pip


quickflat demo

Pycortex is a software that allows you to visualize fMRI or other volumetric mapping data on cortical surfaces.


UPDATE 2015.11.24: Unfortunately, the pip install of pycortex is out of date and broken. The pip installation will thus not work. We apologize for any frustration or inconvenience this may have caused. We will eventually update the version stored on pip, but for now please see below for instructions on how to install pycortex directly from the git repository.

The easiest way to configure your local python environment to suport pycortex is to use the Anaconda python distribution. Download and install anaconda, then run the following command to install one non-standard library (nibabel) for reading and writing fMRI data:

$ sudo pip install nibabel 

This should work on Mac or Linux PCs. If you using Ubuntu, you can skip Anaconda and use the following command instead, which will install all python prerequisites for pycortex.

$ sudo apt-get install python-pip python-dev python-numpy python-scipy python-matplotlib python-h5py python-nibabel python-lxml python-shapely python-html5lib mayavi2 inkscape blender

To install from the github repository, call the following commands. For both commands, replace <your_directory> with the folder where you would like to store the pycortex source code.

$ git clone <your_directory> 
$ cd <your_directory>
$ sudo python install

This last command installs pycortex into the site-packages folder in your local python installation. This means that you will not need to change your PYTHONPATH variable (don't worry if you have no idea what that means). If you are working in a python terminal, do not try to import pycortex from inside the source code directory, or the import will fail.


Pycortex is best used with IPython. To run this demo, please download this example dataset.

$ ipython
In [1]: import cortex
In [2]: ds = cortex.load("S1_retinotopy.hdf")
In [3]: cortex.webshow(ds)


Please find more complete documentation for pycortex at The documentation for pycortex is currently incomplete, but will be improved in the coming days, weeks, or months.


If you use pycortex in published work, please cite the pycortex paper:

Gao JS, Huth AG, Lescroart MD and Gallant JL (2015) Pycortex: an interactive surface visualizer for fMRI. Front. Neuroinform. 9:23. doi: 10.3389/fninf.2015.00023

Something went wrong with that request. Please try again.