Skip to main content

A napari plugin for registration to a BrainGlobe atlas.

Project description

brainglobe-registration

License BSD-3 PyPI Python Version tests codecov

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.

brainglobe-registration

Usage

  1. Open napari.
  2. Install the plugin if you haven't already.
  3. Install an atlas if you haven't already (required before using the plugin).
  4. Open the widget by selecting Plugins > BrainGlobe Registration in the napari menu bar near the top left of the window. brainglobe-registration-plugin The BrainGlobe Registration plugin will appear on the right hand side of the napari window.
  5. Open the image you want to register in napari (a sample 2D image can be found by selecting File > Open Sample > Sample Brain Slice).
  6. Select the atlas you want to register to from the dropdown menu. brainglobe-registration-atlas-selection The atlas will appear in the napari viewer. Select the approximate Z slice of the atlas that you want to register to, using the slider at the bottom of the napari viewer. brainglobe-registration-atlas-selection
  7. 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 Grid mode in the napari viewer (Ctrl+G). You can then adjust the color map and opacity of the atlas image to make manual alignment easier. brainglobe-registration-overlay The sample image can be reset to its original position and orientation by clicking Reset Image in the BrainGlobe Registration plugin window.
  8. 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 Parameters tab.
  9. Click Run to register the image. The registered image will appear in the napari viewer. brainglobe-registration-registered brainglobe-registration-registered

Installation

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.

Installing the Plugin

You can install brainglobe-registration via pip:

pip install brainglobe-registration

or via the napari interface:

  1. Open napari
  2. Go to Plugins > Install/Uninstall Plugins...
  3. Search for brainglobe-registration
  4. 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

Installing an Atlas

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.

Option 1: GUI Installation

You can install atlases through the napari interface using the brainrender-napari plugin. For detailed instructions, see the BrainGlobe atlas management tutorial.

Option 2: Command Line Installation (CLI)

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

License

Distributed under the terms of the BSD-3 license, "brainglobe-registration" is free and open source software

Seeking help or contributing

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.

Citation

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

Acknowledgements

This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brainglobe_registration-0.0.6.tar.gz (8.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

brainglobe_registration-0.0.6-py3-none-any.whl (8.9 MB view details)

Uploaded Python 3

File details

Details for the file brainglobe_registration-0.0.6.tar.gz.

File metadata

  • Download URL: brainglobe_registration-0.0.6.tar.gz
  • Upload date:
  • Size: 8.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for brainglobe_registration-0.0.6.tar.gz
Algorithm Hash digest
SHA256 60ac900c86040d240ed09d3f6adf8c6f843bb48e207f2d2360c55059eb18946d
MD5 2d9e795f4980de41879f28356819281d
BLAKE2b-256 596319bfa95c7f0d09c6717914909130ba1eefc8caafc0a4be0a6c0c4be42b54

See more details on using hashes here.

File details

Details for the file brainglobe_registration-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for brainglobe_registration-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1dc5febd60e74f9332c0ba85eb19da05df536539195c199747a30a6c1ee46e06
MD5 4d75e9c440662010103f5937f64b697e
BLAKE2b-256 ff0815424cc80228283b0317a37808c24bc080b3a8bdbdcbc3f766aa3a9f09aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page