atlasBREX: Automated template-derived brain extraction in animal MRI

We proposed a generic template-derived approach for (semi-) automated brain extraction in animal MRI studies and evaluated our implementation with different animal models (macaque, marmoset, rodent) and MRI protocols (T1, T2). While conventional MR-neuroimaging studies perform brain extraction as an initial step priming subsequent image-registration from subject to template, our proposed approach propagates an anatomical template to (whole-head) individual subjects in reverse order, which is challenging due to the surrounding extracranial tissue, greater differences in contrast pattern and larger areas with field inhomogeneity. As a novel approach, the herein introduced brain extraction algorithm derives whole-brain segmentation using rigid and non-rigid deformation based on unbiased anatomical atlas building with a priori estimates from study-cohort and an initial approximate brain extraction. We evaluated our proposed method in comparison to several other technical approaches including “Marker based watershed scalper”, “Brain-Extraction-Tool”, “3dSkullStrip”, “Primatologist-Toolbox”, “Rapid Automatic Tissue Segmentation” and “Robust automatic rodent brain extraction using 3D pulse-coupled neural networks” with manual skull-stripping as reference standard. ABX demonstrated best performance with accurate (≥92%) and consistent results throughout datasets and across species, age and MRI protocols. ABX was made available to the public with documentation, templates and sample material (https://www.github.com/jlohmeier/atlasBREX).

However, it is common that results are below standard and require further manual intervention. Hence, there is demand for more robust brain extraction algorithms in animal MRI.
Therefore, we proposed a generic template-derived approach for animal neuroimaging: We present atlas-BREX (ABX), a semi-automated processing pipeline that propagates skull-stripping of an anatomical template built from the study-cohort after rigid and non-rigid deformation to each individual subject (see Fig. 2). First, in a practical and unbiased manner, an anatomical study-specific template is computed from all individual subjects (see Fig. 2, step 1) using an iterative hierarchical group-wise registration framework, Atlas Building by Self-Organized Registration and Bundling (ABSORB) 14 . Next, the study-specific anatomical template is subject to manual (hybrid) skull-stripping (see Fig. 2, step 2). In the following steps, rigid and non-rigid deformation fields are computed from template-to target-space (see Fig. 2, step 5 and 7), which are applied to the template mask in order to compute a subject-specific brain mask (see Fig. 2, step 6 and 8).
While spatial transformation is conventionally performed after image preprocessing (including brain extraction) with the objective to align images within or across individuals, our proposed approach is based on the backpropagation of an anatomical template to the (whole-head) individual subject, which is challenging due to the surrounding extracranial tissue, greater differences in contrast pattern and larger areas with strong field inhomogeneity (see Fig. 1).
Therefore, as a novel approach, the herein introduced brain extraction algorithm derives whole-brain segmentation using rigid and non-rigid deformation based on unbiased anatomical atlas building with a priori estimates from the study-cohort and an initial approximate brain extraction. Thereby, our proposed approach achieves accurate and consistent results for an entire study population using only a single template, which exhibits high anatomical conformance and similarity in contrast. On the contrary, available templates, which were not built from the respective study population, can negatively impact the performance of registration algorithms due to greater divergence in brain morphology and differences in contrast pattern, originating from MRI scanner, radiofrequency coil or imaging protocol. In order to address some of the challenges described above, preprocessing operations, such as voxel-scaling, bias-field correction and intensity normalisation, were additionally implemented into the processing stream.
We evaluated ABX across different MRI protocols (T1, T2) with macaques, marmosets and rodents and compared its performance to several other technical methods.
All procedures were approved by Wako Animal Experiment Committee (Animal Care and Use Committee), RIKEN, and all experiments were performed in accordance with the approved guidelines and regulations. The following datasets were obtained: Adult marmoset acquired at RIKEN Brain Science Institute (9.4 T MRI, Bruker, Germany; T2W/RARE, TR/TE = 8000/32 ms, FOV = 48 × 38.5 mm, matrix = 320 × 256, thickness = 0.3 mm, slices = 97, resolution = 0.15 × 0.15 × 0.3 mm, RARE-factor = 8; T2*W/Gradient-EPI, TR/TE = 2000/16 ms, FOV = 42 × 22 mm, matrix = 84 × 44, thickness = 1 mm, slices = 35, resolution = 0.5 × 0.5 × 1 mm). At Central Institute for Experimental Animals (CIEA) juvenile (n = 6, age 6-12 months) marmoset (7 T MRI, Bruker, Germany; T1W/  . Workflow of atlasBREX for (semi-) automated brain extraction. In a first step (1), an unbiased anatomical template is constructed from the respective study-cohort using ABSORB, which is then subject to manual (hybrid) skull-stripping (2). Upon preprocessing in order to optimize the following image registration and initial approximate brain extraction (3), rigid and non-rigid deformation (5 and 7) fields are computed from template-to target-space, which are applied to the template mask in order to compute a subject-specific brain mask (6 and 8). Optional multi-step deformation to other target volumes, such as structural lowresolution (γ) and functional scans (δ), can be performed. Panels on the top-right demonstrate results from an adult marmoset upon rigid (α) and non-rigid (β) deformation as well as the results from the corresponding structural low-resolution (γ) and functional scans (δ). Building templates from the study-cohort using ABSoRB. A hierarchical group-wise registration framework, Atlas Building by Self-Organized Registration and Bundling (ABSORB) 14 , was used for unbiased template building (with histogram-matching and affine-registration; neighbourhood-size: 3; smoothing-kernel: 3,2,1; maximum-levels: 5; registration-to-mean: 3) built from the respective study-cohort (with whole-head images). Datasets were bias-field corrected (N4BiasFieldCorrection, ANTs) and aligned (3dAllineate, AFNI), where the built-in registration algorithm led to insufficient results. Gaussian convolution (3dmerge, AFNI) (smoothing-kernel: 0.3-0.5) was applied to templates after manual (hybrid) skull-stripping with BrainSuite (v16a1). atlasBReX with unbiased anatomical templates. atlasBREX (ABX) is a semi-automated processing pipeline that propagates skull-stripping of an anatomical template built from the study-cohort upon rigid and non-rigid deformation to each individual subject. It requires functional set-up of FMRIB's Software Library (FSL, v5.0). Several optional features are available making use of Analysis of Functional NeuroImages (AFNI, v17.1.01) and Advanced Normalization Tools (ANTs, v2.1.0) 17 . www.nature.com/scientificreports www.nature.com/scientificreports/ At first, a template mask is aligned to a subject using linear registration (FLIRT, FSL) between the template brain and an initial approximate brain extraction from Brain-Extraction-Tool v2 (BET, FSL), as shown in Fig. 2. Prior to the provisional brain extraction, voxel dimensions are adjusted to resemble the human brain and (optional) preprocessing can be applied, such as intensity normalisation (3dUnifize, AFNI), recommended for T1-weighted images, and bias-field correction (N4BiasFieldCorrection, ANTs), which compensates for field inhomogeneity. Changes during preprocessing are implemented on intermediates and, therefore, are not present in final results.
In the following steps, a subject-specific brain mask is computed from the non-rigid deformation field based on non-linear registration (FNIRT, FSL), which relies on the affine transformation matrix from the previous linear registration and a (dilated) reference mask based on the result from rigid deformation, which prevents adverse impact of surrounding extracranial tissue at full resolution during registration. Where additional scans from the same subject are available, such as low-resolution structural or functional scans, rigid and non-rigid transformation matrices can be applied upon an additional transformation step.
Prior to automated processing of an entire dataset, a brief interactive user-guided pilot run needs to be performed to determine a suitable intensity threshold (0.3, 0.5 or 0.8) for the initial approximate brain extraction. evaluation of atlasBReX. For quantitative evaluation, image datasets from infant (n = 8, 0.5-1 months, T1/T2) and juvenile (n = 8, 24-36 months, T1/T2) rhesus macaques, juvenile marmosets (n = 6, 6-12 months, T1), adult marmosets (n = 5, T2) and adult mice (n = 6, T2) were used. ABX was utilized on each dataset (with a single set of parameters upon a brief pilot run to determine an intensity threshold) with an anatomical template built from the respective study-cohort. In addition to Brain-Extraction-Tool v2 (BET), several dedicated technical methods (3dSkullStrip (3DSS), Primatologist-Toolbox (PRIMA) and Marker based watershed scalper (MBWSS) dedicated to non-human primates; Robust automatic rodent brain extraction using 3-D pulse-coupled neural networks (PCNN3D), Rapid Automatic Tissue Segmentation (RATS) and 3dSkullStrip (3DSS) dedicated to rodents) were applied to each dataset. Brain-Extraction-Tool v2 (BET) was assessed with different fractional intensity thresholds (5 variants, thresholds from 0.1-0.9). 3dSkullStrip (3DSS) was evaluated with dedicated presets ("monkey", "rat" and "marmoset"). Marker based watershed scalper (MBWSS) features an optimized version for macaques, which was evaluated with different parameters (one variant with default parameters with (built-in) bias-field correction; 2 variants with settings recommended by the author: bias-field correction, increased smoothing, mask refinement, increased radius of opening). Primatologist-Toolbox (PRIMA) was assessed using respective options for T1-and T2-weighting and presets for "macaque" and "mouse". For MBWSS and BET, where more than one variant was available, the best result was chosen according to the highest Jaccard-Index. All datasets were analysed on the same multi-core hardware platform (32 × 2.70 Ghz Intel-CPU, 260 GB RAM) running Linux 3.10 Centos 64-bit with FMRIB's Software Library (FSL v5.0.10), Analysis of Functional NeuroImages (AFNI v17.2.09) and Advanced Normalization Tools (ANTs v2.1.0). ABX typically required few hours for computation.

Statistical analysis. After visual inspection, quantitative evaluation was performed with manual (hybrid)
skull-stripping as reference standard and Jaccard-Index (1) as similarity metric (metrics reported show Jaccard-Index). Quantitative parameters from the respective groups were analysed for statistically significant presenting common disadvantages of manual (hybrid) brain extraction (α), which is operator-dependent and time-consuming, compared to (semi-) automated skull-stripping (β) using ABX. First two panels (a,b) show common erosion of the olfactory bulb. Jagged edges with marginal erosion of brain tissue are depicted in the following two panels (c,d). Last panels (e,f) demonstrate inaccurate delineation. White arrow indicates the magnified region-of-interest. difference compared to ABX (each group tested against the results from ABX) using Friedman test followed by Dunn's post-hoc test. Adjusted p-value < 0.05 was considered statistically significant.

Evaluation with infant and juvenile rhesus macaques. We evaluated our approach with infant
and juvenile non-human primates, which can be considered challenging due to differences in brain volume and shape with regard to fixed a priori estimates in most brain extraction algorithms.  Table 1.
For infant macaque datasets, as shown in Fig. 3a,b, 3DSS (T1, T2) and PRIMA (T2) achieved decent accuracy, however, visual inspection revealed that laborious manual intervention was inevitable for results from 3DSS (T1), while minor adjustments were needed for results from PRIMA (T2). Regarding juvenile macaque datasets (see Fig. 3c,d), PRIMA (T2) showed reliable performance. Although no statistically significant differences were apparent for MBWSS (T1), 3DSS (T1) and BET (T2), visual inspection showed that extensive manual corrections were still required. PRIMA presented better performance with T2-weighted datasets, while MBWSS showed higher accuracy for datasets with T1-weighting. Contrarily, ABX demonstrated robust and consistent brain extraction throughout datasets. Inaccurate delineation from ABX was apparent in a single case (Jaccard-Index = 0.76), which would have required parameter optimisation. www.nature.com/scientificreports www.nature.com/scientificreports/ Manual definition of the segmentation boundary is tedious and highly operator-dependent, which makes it prone to human error, e.g. unintentional erosion of brain voxels (see Fig. 4a), remaining non-brain tissue (see Fig. 4e) or insufficient masking with jagged edges (see Fig. 4c). In contrast, as shown in Fig. 4b,d,f, results from ABX presented consistent and accurate brain extraction with a high degree of standardisation through automated processing using a single set of parameters.
Evaluation with juvenile and adult marmosets. We evaluated ABX with datasets from juvenile and adult marmosets obtained with different magnetic field strengths (3 T vs. 7 T) and MRI protocols (T1 vs. T2). In particular, the 3 T (adult) marmoset dataset, acquired on a device originally designed for human imaging, is technically demanding due to a greater field-of-view with larger differences in contrast pattern. ABX (Mdn[IQR] = 0.95[0.02]) presented consistent and highest accuracy across datasets (see Table 1 Although there were no statistically significant differences for 3DSS (for both datasets) and PRIMA (for the adult marmoset dataset), visual inspection showed that (extensive) manual intervention was still required (see Fig. 5b,d). Brain voxel erosion (see red colour), notably affected the rostral/anterior and caudal/posterior brain regions (see Fig. 5,d, panel δ (3DSS) and ε (PRIMA)). Moreover, large areas with non-brain tissue (see green colour) remained, demonstrated in Fig. 5b,d, respectively panel ε (PRIMA). In contrast, ABX presented accurate segmentation of the marmoset brain, illustrated with brain models in Fig. 5b,d, respectively panel α, particularly with regard to the olfactory bulb. evaluation with adult mice. Moreover, we evaluated ABX with a rodent dataset, which is challenging to most brain extraction algorithms considering the vastly different brain morphology and difference in contrast between brain and scalp when compared to the primate brain. As shown in Fig. 6

Discussion
We introduced atlasBREX (ABX), a generic automated template-derived approach for brain extraction, and evaluated it with different animal models (macaque, marmoset and rodent) and MRI protocols (T1, T2). ABX demonstrated best performance and presented accurate and consistent results throughout datasets. We showed that (semi-) automated brain extraction using ABX can achieve results similar to manual (hybrid) skull-stripping, which is highly operator-dependent as a function of time-expenditure, neuroanatomical knowledge and experience with subsequent intra-/inter-individual variability. Provided that these premises are not given or present a limiting factor, standardised (semi-) automated skull-stripping using ABX can present a beneficial alternative. While our proposed approach is not entirely operator-independent, the results are substantially less subject to intra-/inter-rater variability compared to manual skull-stripping (as shown in Fig. 4). www.nature.com/scientificreports www.nature.com/scientificreports/ We evaluated our proposed method in comparison to several other technical approaches including Marker based watershed scalper (MBWSS), Brain-Extraction-Tool v2 (BET), 3dSkullStrip (3DSS), Primatologist-Toolbox (PRIMA), Rapid Automatic Tissue Segmentation (RATS) and Robust automatic rodent brain extraction using 3D pulse-coupled neural networks (PCNN3D). In certain datasets, some of the alternative technical methods were able to provide accurate results, however, failed in other conditions, which is, inter alia, attributable to variable field inhomogeneity and differences in contrast pattern 1 . Unlike other technical implementations using convoluted inferences derived from intensity, morphology or surface, template-based methods like ABX present a generic approach with greater versatility regarding interspecies differences in brain size, shape and tissue contrast. The current study demonstrated that our proposed approach shows robust performance regardless of difference in the degree of sulcus folding (macaque vs. marmoset), brain size (marmoset vs. rodent), developmental time course (juvenile vs. adult marmosets) and contrast pattern (T1/T2 or 3 T/7 T/9.4 T). Moreover, template-based approaches allow for simple implementation of specific segmentation protocols with in-or exclusion of distinct brain regions, such as the brain stem, optic chiasm or cerebellum.
But these benefits come at the cost of high computational demand (typically a few hours) and the time investment of a single manual operation, which is still considerably less manual effort than manual (hybrid) skull-stripping of an entire dataset. In contrast, computational workload and computation time was for the herein tested alternatives much lower (a few minutes). Although, this downside becomes debatable with regard to the likelihood for laborious manual intervention, the growing availability of advanced computing systems in research environments and faster non-linear registration algorithms using multithreading and GPU computing. With regard to the importance of skull-stripping for further processing and data analysis, it is common that reasonable amount of effort is dedicated towards achieving accurate results. However, where dedicated technical approaches, such as PCNN3D for rodents, achieve accurate and robust results within a fraction of computation time, suchlike methods should be considered. In the near future an emerging number of methods will leverage the potential of artificial intelligence (AI), e.g. using machine learning (ML) algorithms and convolutional neural networks (CNN), however, it remains controversial whether these methods will be able to provide versatile performance across MRI protocols, species and populations.
Study-specific templates provide the advantage of accounting for inter-subject variation and providing favourable contrast pattern, which can improve rigid and non-rigid deformation. A hierarchical group-wise registration framework, Atlas Building by Self-Organized Registration and Bundling (ABSORB) 14 , was utilised for unbiased anatomical template building: ABSORB provides accurate templates with sharp structural boundaries using an iterative hierarchical group-wise registration approach, where images are warped towards a set of eligible neighbours and representative images from clusters advance to higher levels. In opposition to other template-based methods, which require either multiple atlases or laborious preparation of probabilistic maps, ABX achieves simple and straightforward skull-stripping with unbiased anatomical atlas building from the study-cohort.
In conclusion, we showed that ABX facilitates robust skull-stripping across T1-/T2-weighted datasets from different species (macaques, marmosets and rodents) at different developmental stages. Due to its generic nature, our proposed approach should be foremost considered for animal MRI studies, where no superior or equivalent dedicated technical method is available. Moreover, it is suitable for neurodevelopmental studies considering the vast morphological changes throughout brain development 18,19 , which can be challenging for brain extraction algorithms. Due to implementation as a scriptable (semi-) automated processing pipeline, large-scale, high-throughput application in functional and structural MRI studies is feasible. While ABX makes use of existing neuroimaging frameworks, the provided solution is not implemented in the respective applications and is novel among the technical methods applied. In addition, implementation using popular neuroimaging frameworks may benefit from their ongoing development, such as improvements regarding registration algorithms or parallel computing. Limitations of the current study are (to some extent) small sample size and evaluation restricted to non-human primates and rodents. Future studies should include larger sample size, in particular from open animal neuroimaging databases, which only started gaining in popularity in recent years 15,20 .

Data Availability
Authors confirm that all relevant data are included in the article.