Skip to content

Commit 373e9bd

Browse files
gsoc_brainglobe_registration_blog (#177)
* gsoc_brainglobe_registration_blog * addded header * add intro and images * Reformat intro --------- Co-authored-by: Adam Tyson <[email protected]>
1 parent 7a50f3a commit 373e9bd

File tree

6 files changed

+130
-0
lines changed

6 files changed

+130
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
:blogpost: true
2+
:date: August 25, 2025
3+
:author: Saarah Hussain
4+
:location: London, UK
5+
:category: Blog
6+
:language: English
7+
:image: 0
8+
9+
# GSoC 2025: brainglobe-registration
10+
11+
Over the summer, I worked on extending the brainglobe-registration plugin,
12+
focusing on making atlas alignment more accessible and less error-prone for
13+
users without a neuroscience background. Thus far, choosing the correct atlas
14+
slice and orientation has been a manual task – requiring users to scroll
15+
through volumes, make rough visual judgements, and enter rotation values by
16+
hand. My project aimed to automate this step, using Bayesian optimisation to
17+
identify the best matching slice and orientation parameters directly from the
18+
data.
19+
20+
The result is a new Automatic Slice Detection widget in the plugin, which not
21+
only handles single 2D images but can also align slabs of consecutive slices.
22+
For slabs, the optimiser matches the first and last slices and then
23+
interpolates alignment parameters across the stack, so that users can align
24+
larger volumes in one go. A key part of this work was building clear and
25+
informative logging – every optimisation step records the parameters tested,
26+
the corresponding rotated slice, and its similarity score. This makes the
27+
process more transparent and provides a useful record for reproducibility.
28+
29+
Working on this project has been a valuable experience in bridging methods
30+
from optimisation and image analysis with practical neuroscience workflows.
31+
I particularly enjoyed balancing algorithmic design with UX considerations,
32+
such as keeping the interface intuitive while still exposing enough
33+
flexibility for advanced use. Collaborating with the NIU team also gave me a
34+
deeper appreciation of the importance of open, well-documented tools in
35+
neuroinformatics, and the work that goes into making them robust and
36+
user-friendly.
37+
38+
Looking back, the most rewarding part was seeing the tool go from concept to
39+
a usable feature that I hope will save researchers time and difficulty in
40+
their workflows. Contributing to the BrainGlobe ecosystem has been a greatly
41+
rewarding opportunity, and I am incredibly excited to see how these tools
42+
continue to evolve in the future.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
:blogpost: true
2+
:date: September 15, 2025
3+
:author: Saarah Hussain
4+
:location: London, UK
5+
:category: Blog
6+
:language: English
7+
:image: 0
8+
9+
# GSoC 2025: brainglobe-registration
10+
11+
## Introduction
12+
13+
Hi, I'm [Saarah](https://github.com/saarah815). The intersection of healthcare and software development has
14+
always been important to me, which is why spending my summer with the
15+
[Neuroinformatics Unit](https://github.com/neuroinformatics-unit)
16+
has been the perfect opportunity to bring together the work I love.
17+
18+
**Project**: [BrainGlobe: Automating Region Selection in brainglobe-registration](https://summerofcode.withgoogle.com/programs/2025/projects/7Xk4Fl7t) <br>
19+
**Mentors**: [Igor Tatarnikov](https://github.com/IgorTatarnikov), [Alessandro Felder](https://github.com/alessandrofelder), [Adam Tyson](https://github.com/adamltyson)
20+
21+
---
22+
23+
## Project Overview
24+
25+
Over the summer, I worked on extending the
26+
[`brainglobe-registration`](https://github.com/brainglobe/brainglobe-registration)
27+
plugin, focusing on making atlas alignment more accessible and less
28+
error-prone for users without a neuroscience background.
29+
30+
Thus far, choosing the correct atlas slice and orientation has been a manual
31+
task – requiring users to scroll through volumes, make rough visual
32+
judgements, and enter rotation values by hand. My project aimed to automate
33+
this step, using
34+
[`BayesianOptimization`](https://github.com/bayesian-optimization/BayesianOptimization)
35+
to identify the best matching slice and orientation parameters directly
36+
from the data.
37+
38+
The result is a new **Automatic Slice Detection widget** in the plugin, which
39+
not only handles single 2D images but can also align slabs of consecutive
40+
slices.
41+
42+
![img_1.png](slice_detection_widget.png)
43+
44+
The optimiser identifies the atlas slice and rotation parameters that best
45+
match the moving image, and then updates the Napari widget accordingly:
46+
47+
![img.png](post_slice_detection_screenshot.png)
48+
49+
For slabs, the optimiser matches the first and last slices and then
50+
interpolates alignment parameters across the stack, so that users can align
51+
larger volumes in one go. I have also written detailed
52+
[documentation](https://github.com/brainglobe/brainglobe.github.io/pull/362/files?short_path=61a3e19)
53+
outlining exactly how to use these features.
54+
55+
In addition to the core project requirements, I also worked on enhancing the
56+
project following discussions with my mentors. A key part of this work was
57+
building **clear and informative logging** – every optimisation step logs
58+
the parameters tested, its similarity score, the corresponding rotated slice
59+
image, and the rotation parameters. This makes the process more transparent
60+
and provides a useful record for reproducibility.
61+
62+
Working on this project has been a valuable experience in bridging methods
63+
from optimisation and image analysis with practical neuroscience workflows.
64+
I particularly enjoyed balancing algorithmic design with UX considerations,
65+
such as keeping the interface intuitive while still exposing enough
66+
flexibility for advanced use.
67+
68+
Collaborating with the NIU team also gave me a deeper appreciation of the
69+
importance of open, well-documented tools in neuroinformatics, and the work
70+
that goes into making them robust and user-friendly.
71+
72+
Looking back, the most rewarding part was seeing the tool go from concept to
73+
a usable feature that I hope will save researchers time and difficulty in
74+
their workflows. Contributing to the BrainGlobe ecosystem has been a greatly
75+
rewarding opportunity, and I am incredibly excited to see how these tools
76+
continue to evolve in the future.
77+
78+
---
79+
80+
## Repositories
81+
82+
- [`brainglobe-registration`](https://github.com/brainglobe/brainglobe-registration)
83+
- [`fancylog`](https://github.com/neuroinformatics-unit/fancylog)
84+
- [`brainglobe.github.io`](https://github.com/brainglobe/brainglobe.github.io/)
85+
86+
---
87+
88+
*Thank you to my mentors and the incredible team at NIU for all of their support and guidance!*

docs/source/blog/img.png

90.4 KB
Loading

docs/source/blog/img_1.png

89.2 KB
Loading
633 KB
Loading
89.2 KB
Loading

0 commit comments

Comments
 (0)