SMART: An Open-Source Extension of WholeBrain for Intact Mouse Brain Registration and Segmentation

Abstract Mapping immediate early gene (IEG) expression across intact mouse brains allows for unbiased identification of brain-wide activity patterns underlying complex behaviors. Accurate registration of sample brains to a common anatomic reference is critical for precise assignment of IEG-positive (“active”) neurons to known brain regions of interest (ROIs). While existing automated voxel-based registration methods provide a high-throughput solution, they require substantial computing power, can be difficult to implement and fail when brains are damaged or only partially imaged. Additionally, it is challenging to cross-validate these approaches or compare them to any preexisting literature based on serial coronal sectioning. Here, we present the open-source R package SMART (Semi-Manual Alignment to Reference Templates) that extends the WholeBrain R package framework to automated segmentation and semi-automated registration of intact mouse brain light-sheet fluorescence microscopy (LSFM) datasets. The SMART package was created for novice programmers and introduces a streamlined pipeline for aligning, registering, and segmenting LSFM volumetric datasets across the anterior-posterior (AP) axis, using a simple “choice game” and interactive menus. SMART provides the flexibility to register whole brains, partial brains or discrete user-chosen images, and is fully compatible with traditional sectioned coronal slice-based analyses. We demonstrate SMART’s core functions using example datasets and provide step-by-step video tutorials for installation and implementation of the package. We also present a modified iDISCO+ tissue clearing procedure for uniform immunohistochemical labeling of the activity marker Fos across intact mouse brains. The SMART pipeline, in conjunction with the modified iDISCO+ Fos procedure, is ideally suited for examination and orthogonal cross-validation of brain-wide neuronal activation datasets.

A key technical challenge is the precise registration of experimental brains to a common reference atlas before assignment of detected IEG-positive ("active") neurons to known anatomic regions of interest (ROIs). Existing automated voxel-based registration methods provide a highthroughput solution, but require substantial computing power, are challenging for novice programmers, and fail when brains are incomplete or damaged during staining. Additionally, these approaches provide regional counts spanning the entire anterior-posterior (AP) axis and are challenging to cross-validate or compare against classical "coronal-chunk" activity mapping studies using serial sections around ROIs (DeNardo et al., 2019;Kimbrough et al., 2020Kimbrough et al., , 2021. The R package WholeBrain (Fürth et al., 2018) provides an elegant alternative that combines semi-automated user-refinable registration with automated segmentation of vectorized coronal reference atlas plates and can accommodate flexible imaging resolutions. However, WholeBrain is not optimized for registration of entire mouse brain imaging datasets for three main reasons. First, users are required to manually identify anatomic coordinates along the AP axis that correspond to the reference atlas plate. Second, as segmentation is performed on individual 2D images and then assigned to 3D space, for datasets with a high-resolution z-step size, segmentation can result in duplicate counts across adjacent images. Third, WholeBrain does not account for nonuniformities in tissue morphing along the AP axis during staining and clearing when making z assignments.
To address these gaps, we developed an open-source R package called SMART (Semi-Manual Alignment to Reference Templates), as an extension to the existing WholeBrain package. SMART provides a streamlined pipeline for registration, segmentation and analysis of high-resolution partial and whole-brain imaging datasets. SMART is built with the novice programmer in mind, includes a console interface to guide users through analysis and visualization, and requires minimal programming experience. Notably, SMART allows registration of discrete, user-chosen image stacks across a mouse brain (termed partial datasets) and provides regional counts that can be directly compared against studies based on coronally sectioned brain slice imaging datasets (Crombag et al., 2002;Koya et al., 2009;Bossert et al., 2011Bossert et al., , 2012Navailles et al., 2015;Pelloux et al., 2018;Campbell et al., 2019;Warren et al., 2019;Kane et al., 2021).
Here, we demonstrate the key features of SMART using example mouse whole-brain activity-mapping datasets. We present a modified version of the iDISCO1 immunolabeling and clearing protocol for uniform whole-brain Fos labeling, illustrate the application of SMART to user-guided registration and segmentation of these datasets, and demonstrate new visualization tools for graphical representation of detected Fos-positive (behaviorally active) cells. The goal of SMART is to make brain-wide activity analysis accessible to researchers with limited computational infrastructure and programming expertise. To this end, we provide a static docker image of SMART so that new users can test out SMART's core functions before installing WholeBrain and SMART. We also provide a dedicated webpage with detailed installation instructions, step-by-step video tutorials, and a sample dataset (both raw and fully analyzed data) as a training resource for new users. We discuss the utility of SMART for expert cross-validation of automated wholebrain analysis pipelines such as ClearMap.

Subjects and behavior
We used two three-to six-month-old CD-1 male mice (Charles River Labs, CD-1 IGS; strain code 022) and one Thy-1 GFP transgenic (The Jackson Laboratory, B6; CBA-Tg (Thy1-EGFP) SJrs/NdivJ; stock 011070) mouse that we maintained on a reverse 12/12 h light/dark cycle (lights off at 8 A.M.). We performed all surgical procedures in accordance with the Guide for the Care and Use of Laboratory Animals (Ed 8, 2011), under protocols approved by the local Animal Care and Use Committee. CD-1 mice used for example datasets were taken from a cohort that underwent operant aggression self-administration as previously described (Golden et al., 2017(Golden et al., , 2019a, Mouse 1 (control) was perfused directly from home cage and Mouse 2 (test) was perfused 90 min after a reinforced aggression test.
Tissue clearing and immunolabeling using modified iDISCO1 We used a modified version of the iDISCO1 protocol to achieve uniform Fos immunostaining and tissue clearing across intact mouse brains. Details of the sample pretreatment, immunolabeling and clearing steps are provided in the sections below. The timeline for the entire procedure is shown in Table 1, and a list of reagents and suggested suppliers is shown in Table 2. We also indicate time ranges where appropriate to allow flexibility in scheduling.

Sample collection
We anesthetized the mice with isoflurane and perfused transcardially with 200 ml of 0.1 M PBS (pH 7.4) followed by 400 ml of 4% paraformaldehyde (PFA) in PBS (4% PFA, pH 7.4). We extracted brains and postfixed them in 4% PFA (4°C, overnight). We then transferred brains to 15 ml conical polystyrene centrifuge tubes containing PBS with 0.1% sodium azide for long-term storage at 4°C or processed them on the next day.

Light-sheet fluorescence microscopy (LSFM) imaging
We used a light sheet microscope (UltraMicroscope II, LaVision Biotec) with an attached camera (Andor Neo sCMOS) and a 2Â/0.5 NA objective (MV PLAPO 2XC, Olympus) with noncorrected dipping cap. Cleared tissue was imaged coronally (olfactory bulb side up) using a customized sample platform. We took images in the 488-nm (autofluorescence or Thy1-GFP signal) and 647-nm (Fos) channels and used a z-step size of 2.5 mm. We used Imspector Microscope Open Source Tools and Methods software (v1.44) to control image acquisition with the following parameters: exposure = ;100 ms, sheet NA = 0.156 (5 mm), sheet width = 80%, zoom = 0.63Â, dynamic horizontal focus = 7, dynamic horizontal focus processing = blend, merge light-sheet = blend.

Image preprocessing
We used the 3D rendering software Arivis Vision 4D (3.0.0) to qualitatively check for skew in the coronal alignment in our imaging dataset. We manually corrected alignment to the coronal plane using the software's Data Transformation Gallery and exported the images as TIFF files.

SMART R package development
We wrote all package functions in base R (R Core Team, 2019). We wrote package documentation with roxygen2 (Wickham et al., 2018). We used the magick package (Ooms, 2018) to easily load, save, and modify images; to track function durations, we used the tictoc package (Izrailev, 2014). We used the rgl (Adler et al., 2019), misc3D (Feng and Tierney, 2013), and sunburstR (Bostoc et al., 2019) packages to generate 3D interactive plots, while we used ggplot2 to generate morph plots along the AP axis. We used d3r (Bostock et al., 2019) to easily convert data frames in R into JSON hierarchies. We included these packages, along with WholeBrain (Fürth et al., 2018) as dependencies in SMART. We also include a dependency on the devtools package (Wickham et al., 2019) to facilitate easy installation from GitHub. Finally, we used the Shiny package (Chang et al., 2018) to create an interactive web applet to display our example dataset (https://smartrpackage.shinyapps.io/ smart_sample_dataset).

Package installation and Docker image
A list of online resources for installation and use of SMART and its dependencies are provided in Extended Data Table 1-1. We include a static docker image so new users can test the core features of SMART and its applicability to their data. We recommend that long-term users and those with large datasets follow the online instructions provided to install WholeBrain and SMART natively on their computers within an R development environment (e.g., RStudio).

Data storage and user reference material
Our compressed raw example image dataset is provided online at https://osf.io/y9uax/, courtesy of The Open Science Framework, a free online project management repository. It is easily extractable using 7-Zip, an open-source file archiver.

Pipeline features
SMART builds on the WholeBrain package to process intact whole and partial brain datasets (Fig. 1A). Key improvements include: (1) extensive video tutorials (Extended Data Table 1-1) and written documentation to support SMART package installation and implementation; (2) a unified setup function to define parameters before registration, segmentation, and anatomic assignment (forward warp); (3) a user-friendly console interface during registration for easy addition, modification, and removal of correspondence points or reversion to the previous modification; (4) nonuniform AP deformation is accounted for using semi-manual alignment to user-defined "reference" atlas templates; (5) analysis steps are looped through the entire image dataset with simple function calls; (6) duplicate cell counts assigned to adjacent z-planes during 2D segmentation are identified and removed, extending WholeBrain segmentation to 3D volumes; (7) data output at each step is saved and organized in a standardized format that allows modifications without restarting the pipeline; (8) additional SMART functions provide new ways to parse and visualize data across ROIs. A comprehensive list of all SMART functions is provided in the package documentation and detailed in the online tutorial. We highlight some key features in depth in the remainder of this section.

Software installation
Installation of the SMART package is simple, and accomplished with a single command using the devtools package in R. However, since WholeBrain is a SMART package dependency, it must be preinstalled. We include links to up-to-date instructions for WholeBrain installation on Linux, Windows, and Mac-based operating systems on the package website (https://sgoldenlab. github.io/SMART/index.html). Additionally, to facilitate quicker access to the pipeline to trial WholeBrain and SMART functions, we used Docker (Merkel, 2014), a platform for software virtualization, and created a Linux-based static docker image with WholeBrain and SMART prepackaged. The website also includes instructions to download and run a container of our docker image, a video tutorial of the installation, and our recommendations regarding its usage.

Setup
Analysis parameters are stored in a single variable list created by running the interactive function, se-tup_pl(). All stored parameters are easily modifiable, and this variable list is the main input necessary for all downstream analysis. The function im_sort() orders image paths based on user-defined, flexible, microscope file naming conventions, and the function get_savepaths() generates standardized subdirectories for analysis outputs.

AP alignment
SMART corrects nonlinear relationships between the reference atlas and imaged dataset in the AP axis by interpolating between a subset of user-aligned references plates ( Fig. 2A). First, the start and end images in the dataset are manually assigned AP coordinates by comparing against a standard atlas. We provide an example atlas (accessible through the tutorial website) based on the Allen Mouse Common Coordinate Framework plates used in the WholeBrain package. Next, users specify the AP coordinates of internal reference template plates with histologic landmarks that are either most familiar or most relevant to their experiment. If unspecified, they default to seven suggested plates (11.91, 11.10, À0.42, À0.93, À1.94, À2.95, À3.96 mm bregma) across the AP axis. Table 3 provides descriptions of suggested anatomic landmarks as a guide for users to identify these default coordinate plates.
The selected internal reference templates are aligned to the imaging data through an interactive "choice game" where three image options are presented alongside the reference atlas template (Fig. 2B). The center image is estimated based on interpolation of the first and last aligned image, while the left and right images are further anterior and posterior options, respectively. The choice presentations become progressively closer to each other when the user chooses the middle image, while a choice of the right or left image sets them as the new middle image during the next choice cycle. The default progression of z-step choices between consecutively presented images for each coordinate is 200, 100, 30, and 10 images, although this progression is user-modifiable. Once all internal reference templates have Figure 1. Overview of the SMART analytical pipeline. Red arrows indicate the appropriate trajectory of an intact brain imaging dataset through steps in the pipeline, while blue arrows indicate the appropriate trajectory for a partial brain dataset, consisting of coronal sections chosen by the user. Video tutorials for each step outlined in the schematic are provided in Extended Data Table 1-1. been aligned, users can run a midpoint check (Fig. 2C) to confirm alignment and play the choice game again if needed. All intermediate AP coordinates are estimated by interpolating between reference templates.
We demonstrate the utility of the choice game by comparing the difference between predicted AP coordinates of images based on simple linear interpolation, a strategy used in base WholeBrain, and their actual Figure 2. Diagram of the alignment process to reference templates. A, A schematic illustrating the process of qualitative alignment and inspection of midpoints of reference templates. B, A visual representation of the graphical windows displayed during the choice game and the user options allowed in the R console window. The choice game is cycled through each internal reference template. During the midpoint check, the choice game is automatically played again for midpoints that are unsatisfactorily aligned; these midpoints become additional reference templates. C, A visual representation of the graphical windows displayed during the qualitative midpoint check and the user options in the R console.
Open Source Tools and Methods 8 of 15 coordinates following the choice game (Fig. 3A). Choice of images that aligned accurately to the reference plates were based on detailed inspection of the anatomic landmarks listed in Table 3. Several images differed as much as 300 mm from their predicted AP values, enough to cause significant errors in assignment of detected Fos-positive cell counts to the correct anatomic regions (Fig. 3B). We provide a plotting function after users play the choice game to show the extent of nonlinear deformation in iDISCO1 processed brain samples along the AP axis relative to the Allen Mouse Brain Atlas (Fig. 3C).

Interactive registration improvement
In the base WholeBrain package, removing, changing, or adding registration correspondence points can be tricky for new users as each change requires a separate function call, and it is not possible to revert to a previous state. When registering large volumes with small image zsteps, this is prohibitive. SMART incorporates all steps into a single registration function, regi_loop() that provides an interactive console interface, allows reverting to the last modification, automatically loops through selected atlas registration plates (Fig. 4A), and saves the output of each successful atlas registration (Fig. 4B).

Automated segmentation, duplicate cell count cleanup, and forward warping
The features of interest segmented by WholeBrain are defined by parameters assigned to a segmentation filter. Using the filter as an additional input, SMART automatically loops through the entire image dataset and segments according to the filter parameters. For datasets with a high-resolution z-step, a major issue is the segmentation of the same cell across multiple adjacent images. The SMART function clean_duplicates() corrects for inaccurate artificially inflated cell counts with the dataset based on user-defined distance thresholds in the z-axis and the x-y-axes. The central position of the cell body is marked in the z-position containing the maximum intensity values while duplicate counts across other images are erased. The function forward_warp() loops the WholeBrain warping function through the entire dataset and assigns anatomic x-y-z-positions to corrected segmentation data.

Pipeline validation with intact cleared brain LSFM dataset
We first validated our modified iDISCO1 clearing approach (Fig. 5A) and immunolabeled the IEG Fos throughout the intact tissue of a Thy-1 GFP transgenic mouse Table 3: List of the seven default coordinates used in the "choice game" to align experimental whole-brain mouse LSFM images to the Allen Mouse Brain Atlas (AMBA) AP coordinate Plate # Anatomical landmarks and characteristics 11.91 35 (1) The folds separating the piriform area (PIR) from the orbital area (ORB) span across approximately half the horizontal length of a hemisphere.
(2) There is a distinct teardrop shape to the anterior commissure, olfactory limb (aco).
(3) The nucleus accumbens (ACB) has not yet appeared. 11.10 43 (1) The two "wings" of the corpus callosum, anterior forceps (fa) are just about to touch.
(2) The diagonal band nucleus (NDB) is clearly present and extends halfway the length from the ventral-most point of the midline to the corpus callosum. À0.42 58 (1) The columns of the fornix (fx) and the stria medullaris (sm) have just separated; the stria medullaris is still connected in one piece.
(2) The optic chiasm (och) is directly below the hypothalamus in one piece and has not yet split into two optic tracts (opt). À0.93 63 (1) The CA3 stratum oriens (CA3so) of the hippocampus is just beginning to show within the fimbria (fi); however, multiple layers of the CA3 are not showing yet.
(2) The columns of the fornix (fx) have migrated below the top of the third ventricle.
(3) The optic tracts have migrated close to the border of the hypothalamus and amygdala. À1.94 73 (1) The dentate gyrus (DG) is clearly present and spans approximately 2/3 the horizontal length of one wing of the hippocampus.
(2) The ventral-most point of the granule layer of the dentate gyrus (DG-sg) is roughly the same height as the ventral-most point of the pyramidal layer of CA3 (CA3sp).
(3) The fasciculus retroflexus (fr), mammillothalamic tract (mtt), and columns of the fornix (fx) are clearly seen in their appropriate positions and spaced evenly apart; the mtt is slightly closer to the fx than the fr.
(4) The median eminence is (ME) is clearly visible at the bottom of the midline. À2.95 83 (1) The medial mamillary nucleus (MM) of the hypothalamus has receded and is connected by a thinned layer of hypothalamic tissue.
(2) the posterior commissure (pc) and cerebral aqueduct have migrated down from the 3rd ventricle (V3), and they are separated from V3 by sublayers c and b (SCig-c, S-Cig-b) of the superior colliculus. À3.96 93 (1) The tegmental reticular nucleus (TRN) and pontine gray (PG) are easily identified and separated by the corticospinal tract (cst) and medial lemniscus (ml).
(2) The brachium of the inferior colliculus (bic) protrudes out to the left and right of the midbrain, slightly beyond the middle cerebral peduncle (mcp).
Detailed descriptions of the anatomic landmarks used to match experimental images with the plates are listed. Region acronyms used in the AMBA are also provided so users can cross validate with the AMBA (http://atlas.brain-map.org/atlas?atlas=1). Starred are four AP coordinates with the greatest absolute difference; they correspond to the starred images in A for qualitive comparison. C, Normalized brain morph ratio across the AP axis for two example datasets following the choice game and a midpointcheck. Red dots indicate positions of the aligned reference templates, and the black line indicates interpolated morph ratio for AP positions between aligned reference templates.
We then segmented cell bodies in the Fos channel (647 nm), corrected for duplicate segmentation objects, and performed the forward warp of corrected counts onto atlas space (Fig. 5D).

Data organization and visualization
SMART includes additional functions for visualization of analysis outputs. The function get_table() creates a table displaying all region acronyms, region cell counts, and region cell count percentages in the dataset, while get_rois() extracts only user-specified ROIs from the main dataset. These SMART functions can be combined with existing WholeBrain visualization functions to generate interactive 3D renderings and region cell count plots of user-specified ROIs. We demonstrate these features in our example dataset by generating a 3D rendering of various limbic regions (Fig. 6A) and a region cell count plot of the PFC (Fig. 6B). In addition to the normalized morph plot along the AP axis (Fig. 3C), we demonstrate an interactive sunburst plot showing region cell counts and hierarchical structural relationships as an additional data visualization feature (Fig. 6D). We provide an interactive web applet (https://smartrpackage. shinyapps.io/smart_sample_dataset) for sharing and 3D visualization of SMART outputs.

Discussion
We present SMART, an open-source R package extending the functionality of the WholeBrain analytical pipeline to partial and brain-wide activity mapping using mouse LSFM datasets. Implementation of the SMART analysis pipeline does not require prior programming expertise. Users are guided through the analysis setup process and presented with an intuitive console interface where needed. The modified registration, segmentation, and forward warp functions automatically loop through the entire imaging dataset, a valuable feature when analyzing large neuroimaging datasets. SMART also automatically creates and saves outputs in standardized data subdirectories, facilitating organized storage and sharing of datasets. Further, SMART accounts for nonuniform morphing along the AP axis in cleared tissue datasets and corrects for possible duplication of cell counts during 2D segmentation. We also present a modified Fos immunostaining protocol for uniform labeling and demonstrate SMART's key features using an example mouse LSFM dataset generated following this protocol. While we describe SMART's application to a whole mouse brain LSFM Fos dataset, many of these features can be implemented on LSFM scans of partial brains or even images of single sections and are not restricted to the staining technique or image acquisition parameters used in this manuscript.
An important consideration when using the SMART pipeline is the speed of analysis. The analysis bottleneck of the base WholeBrain package is the manual correction of registered atlas plates. While this is the most time-intensive step and is less efficient than automated methods (Ni et al., 2021), it enables interactive improvement of registration based on users' expertise. Users can save significant time registering an entire brain using SMART's interactive console interface. Using a comparable dataset to the one presented, we estimate that a well-trained user of the SMART pipeline can accurately register an entire mouse brain following 3-4 d of dedicated registration. The remaining segmentation, duplicate cell count cleaning, and forward warping processes can be completed within 1 d. A notable feature of SMART is that it allows users to save intermediate stages of analysis and return to them when convenient. This makes it possible for multiple users to work on the same data in tandem and spread the time commitment across entire teams.
The main determinant of the accuracy of region cell count mapping is the pipeline user's own anatomic knowledge. This remains both an advantage and disadvantage of the SMART-WholeBrain approach compared with other typically intensity-based voxel registration approaches: users can easily evaluate registration quality and correct for misalignments, but between-user reproducibility in registrations requires that users have Figure 5. Representative images of registration correction and Fos segmentation from an example dataset. A, Transparency of intact mouse brain samples pre-iDISCO1 and post-iDISCO1 immunolabeling and clearing. B, Example LSFM tissue section of an intact cleared brain from a Thy-1 GFP transgenic mouse (left); an enlarged cortical image in the YFP and Fos imaging channels (right). C, Representative images of initial and corrected atlas-tissue registrations in the autofluorescence channel (488 nm) of the example dataset from Mouse 1 at various AP coordinates. Note the improved alignment of internal structures such as ventricles and white matter tracts. D, Images of Fos-IHC (647 nm) and segmented Fos-positive cells following automated 2.5D segmentation, cleanup of duplicate cell counts and forward warping onto atlas space. similar anatomic expertise. However, we propose that using these approaches in parallel provides the best outcome. An initial registration pass using automated voxelbased approaches like ClearMap (Renier et al., 2016), can provide a broad view of activity patterns across the entire brain and highlight zones along the AP axis with ROIs. This can be followed up by user-guided fine-tuned registration in SMART (using coronal plates restricted to these identified AP axis limits) to produce detailed counts of individual regional subdivisions. These counts can serve both as an orthogonal cross-validation of ClearMap outputs and allow further isolation of target region boundaries in the AP axis. Additionally, the results are easily compared with prior classical slice section-based IEG studies, and provide refined stereotaxic targets for resulting chemogenetic, optogenetic, and pharmacological approaches to test for a functional role of any detected target regions. SMART outputs may also be visualized Figure 6. Graphical representations of whole-brain Fos datasets following SMART registration, and segmentation. A, 3D rendering of the entire mapped dataset (Mouse 1) from Figure 4, left, and a 3D rendering of the indicated ROIs (right). B, Region plot quantifying segmented Fos-positive cell bodies in the PFC (Mouse 1, PL and IL). C, Sunburst plots showing region cell counts and hierarchical structural relationships for two example datasets. The innermost ring represents all cell counts, with each subsequent outer ring representing child structures of the adjacent inner ring. Regions colors are based on the Allen Mouse Brain Atlas and arc length is proportional to total cell counts. Plots are interactive and hovering over an arc reveals region identity, hierarchical path, and region cell count (right). ACB, nucleus accumbens; IL, infralimbic cortex; PL, prelimbic cortex. and shared through dedicated brain visualization software such as BrainRender (Claudi et al., 2021).
Mapping of cell distributions across intact brain tissue is becoming an integral approach toward understanding the activity and function of neural circuits at the level of the connectome. The resurgence in interest in tissue clearing techniques within the last decade has driven new advancements in high resolution volumetric imaging methodologies, such as serial two-photon tomography (Ragan et al., 2012) and LSFM (Dodt et al., 2007). Such methods faithfully capture biological information at subcellular resolution, but in doing so, they generate unwieldy sizes in neuroimaging datasets. A key bottleneck is the registration and cellular segmentation of these massive datasets to a standardized atlas to enable across-subject and across-experimental group comparisons.
While automated voxel-based registration approaches provide a high-throughput solution, they typically have high computational demands, require programming expertise, and rarely allow for user-evaluation or manual correction. Presently, the most common voxel-based approach is the use of ClearMap (Renier et al., 2016;Kirst et al., 2020), recently updated to ClearMap2. In contrast, WholeBrain's spline-based computational framework is versatile because of its minimal processing requirements, scale-invariant registration, and manual registration correction capabilities. To accommodate these technical differences, minimum processing requirements between these are approaches are large: ClearMap requires highlevel multi-CPU processing and minimum of 256 GB RAM while WholeBrain accommodates standard CPU processing and a minimum of 32 GB RAM. Other technical differences include the level of registration automation, where ClearMap is fully automated and WholeBrain is semi-automated, and programming environment, where ClearMap is written in Python and WholeBrain in R. These considerations may help users select the more appropriate approach for analysis of their datasets. However, the WholeBrain package was primarily built to analyze serial sections across the AP axis with wide z-spacing and is not optimized for analysis of high z-resolution LSFM datasets.
SMART extends WholeBrain's functionality in this domain, and streamlines the user experience through installation, setup, registration, segmentation and analysis. SMART lowers the barrier to entry by guiding users through each individual step of installation and analysis, includes qualitative checks during each step of the process, and provides simple tools for visualization of results. It retains the core strengths of WholeBrain (e.g., low processing requirements, user-guided registration correction) and adds new functions to support analysis and visualization of partial and whole mouse brain LSFM datasets.
We expect the SMART package will enhance the accessibility of the base WholeBrain package and encourage more users to undertake neural mapping projects, whether using full brain or partial brain datasets. To this end, we include a detailed website to guide new users through installation of the necessary software and package dependencies and provide step-by-step instructions and video tutorials (Extended Data Table 1-1) of SMART's