Skip to content
Pycortex is a python-based toolkit for surface visualization of fMRI data
JavaScript Python C CSS C++ HTML Objective-C
Branch: master
Clone or download


Build Status

quickflat demo

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


# create a virtual environment called env with Python 3
python3 -m venv env  
# activate the virtual environment
source env/bin/activate
# install some prerequisite packages
pip install -U setuptools wheel numpy cython
# install the latest release of pycortex from pip
pip install -U pycortex

This command creates a new virtualenv for pycortex to resolve dependencies. Run source env/bin/activate whenever you need pycortex.

If you want to install the latest, unreleased version of pycortex from github, instead of the last line you can run

# install unreleased version of pycortex from github
pip install -U git+git://


Pycortex documentation is available at You can find many examples of pycortex features in the pycortex example gallery.

To build the documentation locally:

pip install sphinx_gallery
pip install numpydoc
cd docs
make html
# open `docs/_build/html/index.html` in web browser


Pycortex is best used with IPython. Install it in your virtualenv using

source env/bin/activate
pip install ipython

To run the pycortex demo,

$ ipython
In [1]: import cortex
In [2]: cortex.webshow(cortex.Volume.random("S1", "fullhead"))


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

Getting help

Please post on NeuroStars with the tag pycortex to ask questions about how to use Pycortex.

You can’t perform that action at this time.