What are some Python-based techniques for visualizing surface-level brain maps?

I want to visualize some surface-level effect size maps on top of a 3D brain. What are some good python-based methods for this?

There are a few different options:

  1. I personally like the surface plotting in nilearn. The interactive plot works well with jupyter notebooks and jupyter books.

  2. Some people really like Pycortex from the Gallant lab. I had a lot of difficulty installing it and getting it to work last time I tried a few years ago. The visualizations they make with it are amazing if you can get it to work.

  3. You can also use the web version of pycortex via neurovault, which isn’t as accurate, but is much easier.

  4. The connectome workbench is open source, but not python based.

3 Likes

I usually use nilearn too, but there’s also:

  • PySurfer (examples), which makes really nice plots and was written in part by Michael Waskom (seaborn author)
  • visbrain (examples, paper), which I’ve never used but know other people in the department have and like

I also had a ton of trouble getting Pycortex to work when I tried to use it a couple years ago. At the time, it turned out to be because Pycortex assumes it’s installed on NeuroDebian and tries to run FSL commands using the names NeuroDebian assigns to FSL binaries. It might be fixed now, but if not, here is everything I had to change on my fork to make it work on MacOS.

1 Like