generated from neuroinformatics-unit/HowTo
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Blog update with bg-space renaming (#143)
* Write blog post * bg-space -> brainglobe-space everywhere * Update the dependency tree * Update blog with affected packages * Tackle broken link (and enforced file lint, thanks VSCode) * Light mode diagram
- Loading branch information
1 parent
a472d07
commit 24f3e7e
Showing
12 changed files
with
84 additions
and
1,615 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
blogpost: true | ||
date: Jan 24, 2024 | ||
author: Will Graham | ||
location: London, England | ||
category: brainglobe | ||
language: English | ||
--- | ||
|
||
# `bg-space` has been renamed | ||
|
||
The "bg" prefix that a number of BrainGlobe tools carry is not very distinctive nor informative, so we are rolling out minor name changes to a lot of our packages that contain this prefix. | ||
We are also taking this opportunity to bring these tools into line with our developer guidelines for automatic deployment, tooling, and testing. | ||
|
||
The first on our list is `bg-space`, which will be changing name to the more explicit `brainglobe-space`. | ||
Beyond this name change, there will be no functionality changes to the package, but several other tools will switch to depending on `brainglobe-space` from now on, and `bg-space` will be archived and not receive any future updates. | ||
|
||
## What do I need to do? | ||
|
||
Users who installed BrainGlobe through it's single ("meta") package install with `pip install brainglobe` will just need to update the package by running | ||
|
||
```bash | ||
pip install brainglobe --update | ||
``` | ||
|
||
in your environment, which will fetch the new version of all the affected packages. | ||
You can use `pip show brainglobe` to check your version has updated - you should find you now have `brainglobe` version as 1.0.1 or higher. | ||
|
||
If you are manually managing your BrainGlobe tools, you will need to uninstall `bg-space` and install `brainglobe-space` in its place. | ||
You'll also need to update the following packages, which have dropped their `bg-space` dependency and now depend on `brainglobe-space`: | ||
|
||
- `bg-atlasapi`, version 1.0.3 or newer. | ||
- `brainglobe-napari-io`, version 0.3.3 or newer. | ||
- `morphapi`, version 0.2.2 or newer. | ||
- `brainrender`, version 2.1.5 or newer. | ||
- `brainreg`, version 1.0.4 or newer. |
1,577 changes: 4 additions & 1,573 deletions
1,577
...e/community/developers/repositories/brainglobe-meta/brainglobe-dependencies.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
66 changes: 33 additions & 33 deletions
66
docs/source/documentation/brainreg/user-guide/brainreg-napari.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,70 @@ | ||
# Napari plugin | ||
How to use the brainreg napari plugin | ||
|
||
How to use `brainreg`'s napari plugin. | ||
|
||
## Getting started | ||
|
||
To register your data, you will need a whole-brain image, i.e., not a part of a brain, and not some individual 2D | ||
sections. The format doesn't matter, as long as it can be loaded into napari, and the orientation etc. is dealt with by brainreg. | ||
To register your data, you will need a whole-brain image, i.e., not a part of a brain, and not some individual 2D sections. | ||
The format doesn't matter, as long as it can be loaded into napari. | ||
The orientation, etc, is dealt with by `brainreg`. | ||
|
||
## Loading data | ||
|
||
Loading your data into napari will vary depending on the data type, but with most types, you should be able to drag | ||
and drop your data into the main napari window. | ||
Loading your data into napari will vary depending on the data type, but with most types, you should be able to drag and drop your data into the main napari window. | ||
|
||
:::{note} | ||
If you are having trouble loading your data into napari, first check the [napari hub](https://www.napari-hub.org/) to | ||
see if there's a plugin to help. If that fails, go ahead and ask the nice people at the | ||
[image.sc](https://forum.image.sc/tag/napari) forum to see if anybody can help. | ||
If you are having trouble loading your data into napari, first check the [napari hub](https://www.napari-hub.org/) to see if there's a plugin to help. | ||
If that fails, go ahead and ask the nice people on the [image.sc](https://forum.image.sc/tag/napari) forum to see if anybody can help. | ||
::: | ||
|
||
## Starting the plugin | ||
|
||
Click `Plugins` at the top of the main napari window, and then click `brainreg-register: Atlas registration`. A new | ||
docked widget will appear in your napari window. | ||
Click `Plugins` at the top of the main napari window, and then click `brainreg-register: Atlas registration`. | ||
A new docked widget will appear in your napari window. | ||
|
||
## Setting up registration | ||
|
||
Choose the napari image layer you wish to be registered from `Image layer`, along with the atlas you want to use from | ||
`Atlas`. You must also set the voxel sizes in the axial (z) and in-plane (x, y) dimensions, along with the data | ||
orientation. The orientation is defined by three letters, based on [bg-space](https://github.com/brainglobe/bg-space), | ||
e.g. `psl`. For more details on this, see the outline | ||
[here](/documentation/setting-up/image-definition). Lastly, set an `Output directory` | ||
(where you want to save the data). | ||
Choose the napari image layer you wish to be registered from `Image layer`, along with the atlas you want to use from `Atlas`. | ||
You must also set the voxel sizes in the axial (z) and in-plane (x, y) dimensions, along with the data orientation. | ||
The orientation is defined by three letters, based on [brainglobe-space](https://github.com/brainglobe/brainglobe-space), e.g. `psl`. | ||
For more details on this, see the outline [here](/documentation/setting-up/image-definition). | ||
Lastly, set an `output directory` (where you want to save the data). | ||
|
||
### Registering additional channels | ||
`brainreg` will use a single channel for registration. This is typically an image without much signal, | ||
such as an image of only autofluroescence. Images of brain-wide stains such as DAPI can also work well. | ||
|
||
To register any additional channels, make sure these are selected in the list of layers on the left-hand side of the | ||
napari window. The registration will be performed on the image chosen as `Image layer`, but the transformations will be | ||
applied to these other channels. This is useful if you want to later analyse multiple channels, or if the channel of interest | ||
registers poorly due to high signal levels from staining etc. | ||
`brainreg` will use a single channel for registration. | ||
This is typically an image without much signal, such as an image of only autofluroescence. | ||
Images of brain-wide stains such as DAPI can also work well. | ||
|
||
To register any additional channels, make sure these are selected in the list of layers on the left-hand side of the napari window. | ||
The registration will be performed on the image chosen as `Image layer`, but the transformations will be applied to these other channels. | ||
This is useful if you want to later analyse multiple channels, or if the channel of interest registers poorly due to high signal levels from staining, etc. | ||
|
||
:::{caution} | ||
Make sure that the image layer you are registering is not selected in the list of napari image layers on the left-hand | ||
side, otherwise it will be registered twice! | ||
Make sure that the image layer you are registering is not selected in the list of napari image layers on the left-hand side, otherwise it will be registered twice! | ||
::: | ||
|
||
## Setting additional parameters | ||
There are many parameters that can be set to improve registration performance. For more details on these, see | ||
the documentation [here](./parameters). | ||
|
||
There are many parameters that can be set to improve registration performance. | ||
For more details on these, see the documentation [here](./parameters). | ||
|
||
## Running brainreg | ||
|
||
You can then click `Run`, and the registration will start. Lots of stuff will get printed to the console as | ||
brainreg runs, and when it's done (it should only take a minute or so), you will see something like: | ||
You can then click `Run`, and the registration will start. | ||
Lots of stuff will get printed to the console as brainreg runs, and when it's done (it should only take a minute or so), you will see something like: | ||
|
||
``` | ||
```bash | ||
INFO - MainProcess cli.py:230 - Finished. Total time taken: 0:00:29.15 | ||
``` | ||
|
||
This means that the registration is complete, but you should see the results appear in the napari window. | ||
|
||
Once the registration is complete, some new image layers will appear: | ||
|
||
* Atlas annotations - this the annotations image from the atlas (where each brain region has a unique value) warped to the data | ||
* Boundary image - this is a binary image, showing the boundaries between atlas regions. | ||
- Atlas annotations - this the annotations image from the atlas (where each brain region has a unique value) warped to the data | ||
- Boundary image - this is a binary image, showing the boundaries between atlas regions. | ||
|
||
These files are not the only ones created; they will all be saved in the output directory. | ||
These can be loaded into napari at any time, see the [main visualisation page](visualisation). | ||
These files are not the only ones created; they will all be saved in the output directory. | ||
These can be loaded into napari at any time, see the [main visualisation page](visualisation). | ||
For more details of the output files created, please see [output files](output-files). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters