Python API for working with brain atlases

Possibly slightly niche for this forum, but we’ve released the BrainGlobe Atlas API (bg-atlasapi) Version 1.0.0.

Please take a look at the software, documentation, tutorial and the paper.

bg-atlasapi is a lightweight python module for interacting with many brain atlases used in neuroscience (Allen Mouse, Max Planck larval zebrafish etc.).

The aim is to simplify the use of these atlases by providing a consistent API, but more importantly, to reduce the amount of wasted time in software development. By using bg-atlasapi you can write your software for use with one model species/atlas, and others can use your software in another.

The atlases currently implemented are:

If you think this software would be useful, we’d love you to try it out (and let us know how you get on). In particular, get in touch if you’d like to contribute an atlas.



Hey @adamltyson, very cool API!

You might be interested in ccf-widget, a Jupyter widget made by Kitware that provides an interactive 3D view of the Allen mouse CCF atlas. It would be great if this were generalized to a variety of different standard species atlases.


Thanks @bendichter,

I had a look at ccf-widget when we spoke a while back. It would be cool to extend it to support all the BrainGlobe atlases, but I think that would likely require quite a bit of work, and it also overlaps quite a bit with brainrender (by one of the BrainGlobe developers). That being said, if anyone wants to use bg-atlasapi to further develop ccf-widget, we’d always be happy to help.

Ah yes, now I remember. brainrender looks great as well!

It’s a bit harder to find brainrender, since it is not part of the brainglobe github org.

Yep, we have quite a few tools that are not necessarily too easy to find as they’re in different places (due to where they were originally developed). Hopefully this will be improved soon.

Just in case anyone comes across this thread, there are (among others):

  • bg-atlasapi The API itself for dealing with atlases
  • brainreg 3D brain registration to BrainGlobe atlases
  • cellfinder Efficient 3D cell detection in whole brain images, which comes bundled with brainreg for assigning detected cells to brain regions
  • brainrender 3D visualization of brain anatomy data in atlas space
  • bg-space for reorienting data according to anatomical space conventions
  • morphapi APIs for downloading neuronal morphology data
  • bg-atlasgen scripts for generating BrainGlobe atlases

I’ve been playing around with this + brainrender. Really cool stuff! I got it to work with ipywidgets as well. Definitely going to be useful for some of our projects. Thanks for laying the groundwork!

Any plans for a rat brain?

We have the data for a rat brain, but there’s still a bit of work to do. It’s based on MRI, so it won’t be the same resolution as the Allen-based mouse atlases.