Registering a whole-brain image to an atlas#
The focus of this tutorial is simply to successfully register a single image. Optimising brainreg for specific applications will be covered separately.
You will need
napari installed on your computer - please follow
napari’s installation instructions to do so.
Plugins > Install/Uninstall pluginsand searching for
brainreg-napariin the searchbox. Then click on the
brainregwidget by selecting
Plugins > Atlas registration (brainreg-napari)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 limitsin 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 the
Sample brainimage layer
Atlas- Set this to
Data orientation- Set this to
Voxel size (z)- Set to 50
Voxel size (x)- Set to 40
Voxel size (y)- Set to 40
Output directory- Click
Choose directory, and create a new directory on your machine
Run. After 30-60 seconds, two new napari layers will be loaded,
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.
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)
For full information on how to use brainreg, please see the brainreg page