Registering a whole-brain image to an atlas#
In this tutorial, you will use the brainreg plugin for napari to register (align) a whole-mouse brain image to a reference atlas.
The focus of this tutorial is simply to successfully register a single image. Optimising brainreg for specific applications will be covered separately.
Note
You will need napari
installed on your computer - please follow napari
’s installation instructions to do so.
Open
napari
.Install
brainreg
by selectingPlugins > Install/Uninstall plugins
and searching forbrainreg
in the searchbox. Then click on theInstall
button.Open the
brainreg
widget by selectingPlugins > Atlas registration (brainreg)
in the napari menu bar near the top left of the window.
The brainreg widget appears on the right-hand side of the window.
Open the sample image by selecting
File > Open Sample > Low resolution brain (brainreg-napari)
.Make the image easier to see by adjusting the
contrast limits
in the top left section of the napari window. Moving the right-hand slider to the left will make the image appear brighter.
A whole mouse brain image loaded into napari.
In the plugin widget, set all the necessary parameters:
Image layer
- Set this to theSample brain
image layerAtlas
- Set this toallen_mouse_50um
Data orientation
- Set this topsl
Voxel size (z)
- Set to 50Voxel size (x)
- Set to 40Voxel size (y)
- Set to 40Output directory
- ClickChoose directory
, and create a new directory on your machine
Click
Run
. After 30-60 seconds, two new napari layers will be loaded,Boundaries
andallen_mouse_50um
.Toggle the visibility of these two layers (using the eye icon on the left of the layer name) to overlay the registration results. These can be explored by zooming in/out, scrolling through the 3D data and adjusting the visibility and contrast of the loaded data.
Registration results overlaid onto raw data.
At this point, registration is complete. A number of files are created in the output directory that can be used for downstream analysis.
Note
The results are likely not perfect because (for speed and simplicity) we:
Used very low-resolution data
Use a low-resolution atlas
Left all the parameters as default (which were optimised for higher resolution atlases)
Hint
For full information on how to use brainreg, please see the brainreg page