|
| 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 | + |
| 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 | + |
| 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!* |
0 commit comments