Localization and Registration of 2D Histological Mouse Brain Images in 3D Atlas Space

To accurately explore the anatomical organization of neural circuits in the brain, it is crucial to map the experimental brain data onto a standardized system of coordinates. Studying 2D histological mouse brain slices remains the standard procedure in many laboratories. Mapping these 2D brain slices is challenging; due to deformations, artifacts, and tilted angles introduced during the standard preparation and slicing process. In addition, analysis of experimental mouse brain slices can be highly dependent on the level of expertise of the human operator. Here we propose a computational tool for Accurate Mouse Brain Image Analysis (AMBIA), to map 2D mouse brain slices on the 3D brain model with minimal human intervention. AMBIA has a modular design that comprises a localization module and a registration module. The localization module is a deep learning-based pipeline that localizes a single 2D slice in the 3D Allen Brain Atlas and generates a corresponding atlas plane. The registration module is built upon the Ardent python package that performs deformable 2D registration between the brain slice to its corresponding atlas. By comparing AMBIA’s performance in localization and registration to human ratings, we demonstrate that it performs at a human expert level. AMBIA provides an intuitive and highly efficient way for accurate registration of experimental 2D mouse brain images to 3D digital mouse brain atlas. Our tool provides a graphical user interface and it is designed to be used by researchers with minimal programming knowledge. Supplementary Information The online version contains supplementary material available at 10.1007/s12021-023-09632-8.


Online Resource 2 The graphical user interface (GUI) of AMBIA
Here we provide screenshots of the graphical user interface (GUI) of AMBIA to analyse 2D histological mouse brain slice images (MBI). To facilitate the wider use of AMBIA in practice, we have implemented all of its functionalities and modules in a GUI that is easy to use and requires minimal programming knowledge. Figures A1-6 presents the GUI screenshots representing various stages of the process. Our pipeline is made open access for the scientific community. The source code of AMBIA can be obtained at https://github.com/mrymsadeghi/AMBIA.

Fig. A1
In the first stage the user can load a whole slide image which may contain multiple MBIs. By clicking the "Detect" button, individual MBIs on the slide image are detected and displayed in the bottom panel. The user can then choose which MBI to proceed with. By clicking the "Accept" button the user is directed to the next stage which is the Neuron detection stage.

Fig. A2
In the neuron detection stage, the individual selected MBI is displayed. Any customised cell detection python code can be implemented. AMBIA allows for the integration of various cell detection methods through the use of a placeholder module in the pipeline. This flexibility enables researchers to employ a range of analyses to suit the needs of their specific study. In the left panel parameters of the cell detection algorithm can be adjusted and by clicking the "Apply" button, the neurons are detected, counted and displayed on the screen. The user can also add or remove detected neurons by clicking on them on the displayed image. By clicking the "Accept" button the user is directed to the next stage which is the localization stage.

Fig. A3
In the localization stage, the localization module detects the corresponding atlas plane and displays the Allen mouse brain atlas according to the atlas number predicted. The user can choose a different atlas number manually. Additionally by switching the tilted atlas toggle on, the Q values for the quadrants are predicted and displayed and the corresponding tilted atlas is generated by the AMBIA atlas generator algorithm. Here also the user can modify the Q values if necessary. After choosing the atlas plane the user can click the "Accept" button, which performs the automatic registration between the MBI and the selected/generated atlas plane.

Fig. A4
After the automatic registration is performed an overlaid version of the registered MBI on the atlas is displayed to the user to be able to assess the quality of the automatic registration. A slide bar on the left side of the screen allows the user to change the relative opacity of the two overlaid images.

Fig. A5
After examining the automatic registration, the user can go back and refine the registration by manually choosing landmark(LM)s on the MBI and the atlas image. The coordinates of the LMs are displayed in the panels below each image, and can be deleted if necessary. The LM-based registration is confirmed by clicking the "Accept" button, which redirects the user to the registration preview stage to assess the quality of the registration visually. This iterative process can be repeated until the desired level of registration is achieved.

Fig. A6
After confirming the registration preview stage by clicking the "Accept" button, the user is redirected to the final report stage. The coordinates of the detected neurons are transformed into the atlas space using the registration transform functions, and their location is displayed on the atlas. The number of detected neurons in each brain region is displayed in the left panel and can be exported as an Excel sheet and a text file for further analysis.