Profile
Back to NewsBack
GitHub Trending 2 min
Reader Mode
gallantlab/pycortex: Pycortex is a python-based toolkit for surface visualization of fMRI data

gallantlab/pycortex: Pycortex is a python-based toolkit for surface visualization of fMRI data

15 hours ago

pycortex ======== Build Status</a> codecov</a> PyPI</a> Python version</a> License</a>

quickflat demo</a>

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

Installation ------------

To install the stable release version of pycortex, do the following:

# Install the latest release of pycortex from pip
pip install -U pycortex

or, with headless rendering support:

pip install -U 'pycortex[headless]'

or, with automatic surface flattening support (see autoflatten):

pip install -U 'pycortex[autoflatten]'

or, with all optional features:

pip install -U 'pycortex[all]'

If you wish to install the development version of pycortex, you can install it directly from Github.

To do so, replace the first install line above with the following:

# Install development version of pycortex from github
pip install -U git+https://github.com/gallantlab/pycortex.git

Note you will need a C compiler installed to build from scratch because there are cython code.

Documentation ------------- Pycortex documentation is available at https://gallantlab.github.io/pycortex.

You can find many examples of pycortex features in the pycortex example gallery.

To build the documentation locally:

# Install required dependencies for the documentation
pip install sphinx_gallery numpydoc

Move into the docs folder (assuming already in pycortex directory)

cd docs

Build a local version of the documentation site

make html

After you run the above, you can open docs/_build/html/index.html in a web browser to view the locally built documentation.

Demo ---- Pycortex is best used with [IPython]().

If you do not already have IPython, you can install it by running:

pip install ipython

To run the pycortex demo, using IPython, run:

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

Citation -------- 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_

Chat with me