Registration to a BrainGlobe atlas using Elastix
Warning
This tool is in very early development. The interface may change and some features are not yet available.
A napari plugin for registering images to a BrainGlobe atlas.
- Open
napari. - Install the plugin if you haven't already.
- Install an atlas if you haven't already (required before using the plugin).
- Open the widget by selecting
Plugins > BrainGlobe Registrationin the napari menu bar near the top left of the window.
The BrainGlobe Registrationplugin will appear on the right hand side of the napari window. - Open the image you want to register in napari (a sample 2D image can be found by selecting
File > Open Sample > Sample Brain Slice). - Select the atlas you want to register to from the dropdown menu.
The atlas will appear in the napari viewer. Select the approximate Zslice of the atlas that you want to register to, using the slider at the bottom of the napari viewer.
- Adjust the sample image to roughly match the atlas image.
You can do this by adjusting X and Y translation as well as rotating around the centre of the image.
You can overlay the two images by toggling
Gridmode in the napari viewer (Ctrl+G). You can then adjust the color map and opacity of the atlas image to make manual alignment easier.
The sample image can be reset to its original position and orientation by clicking Reset Imagein theBrainGlobe Registrationplugin window. - Select the transformations you want to use from the dropdown menu. Set the transformation type to empty to remove a step.
Select from one of the three provided default parameter sets (elastix, ARA, or IBL). Customise the parameters further in the
Parameterstab. - Click
Runto register the image. The registered image will appear in the napari viewer.

We strongly recommend to use a virtual environment manager (like conda or venv). The installation instructions below
will not specify the Qt backend for napari, and you will therefore need to install that separately. Please see the
napari installation instructions for further advice on this.
You can install brainglobe-registration via pip:
pip install brainglobe-registration
or via the napari interface:
- Open napari
- Go to
Plugins > Install/Uninstall Plugins... - Search for
brainglobe-registration - Click
Install
For detailed instructions on finding and installing plugins in napari, see the napari plugin installation guide.
To install the latest development version:
pip install git+https://github.com/brainglobe/brainglobe-registration.git
Important: Before you can use the plugin, you must download at least one BrainGlobe atlas. The plugin requires an atlas to be installed on your system.
You can install atlases through the napari interface using the brainrender-napari plugin. For detailed instructions, see the BrainGlobe atlas management tutorial.
You can also install an atlas using the brainglobe command-line tool. For example, to install the Allen Mouse Brain Atlas at 25μm resolution:
brainglobe install -a allen_mouse_25um
To see all available atlases, run:
brainglobe list
Distributed under the terms of the BSD-3 license, "brainglobe-registration" is free and open source software
We are always happy to help users of our tools, and welcome any contributions. If you would like to get in contact with us for any reason, please see the contact page of our website.
If you find this package useful, and use it in your research, please cite the following:
Igor Tatarnikov, Alessandro Felder, Kimberly Meechan, & Adam Tyson. (2025). brainglobe/brainglobe-registration. Zenodo. https://doi.org/10.5281/zenodo.14750325
This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.
