Abstract High-resolution spatial imaging is transforming our understanding of foundational biology. Spatial metabolomics is an emerging field that enables the dissection of the complex metabolic landscape and heterogeneity from a thin tissue section. Currently, spatial metabolism highlights the remarkable complexity in two-dimensional (2D) space and is poised to be extended into the three-dimensional (3D) world of biology. Here we introduce MetaVision3D, a pipeline driven by computer vision, a branch of artificial intelligence focusing on image workflow, for the transformation of serial 2D MALDI mass spectrometry imaging sections into a high-resolution 3D spatial metabolome. Our framework uses advanced algorithms for image registration, normalization and interpolation to enable the integration of serial 2D tissue sections, thereby generating a comprehensive 3D model of unique diverse metabolites across host tissues at submesoscale. As a proof of principle, MetaVision3D was utilized to generate the mouse brain 3D metabolome atlas of normal and diseased animals (available at [57]https://metavision3d.rc.ufl.edu) as an interactive online database and web server to further advance brain metabolism and related research. __________________________________________________________________ Spatial biology has emerged as a pivotal discipline for decoding the spatial organization and interactions of biomolecules within cells and tissues. Building upon the foundational pillars of spatial transcriptomics^[58]1,[59]2, spatial proteomics^[60]3,[61]4 and spatial metabolomics^[62]5,[63]6, the field is substantially advancing our understanding of biological systems within multicellular organisms. Specifically, spatial metabolomics, performed through matrix-assisted laser desorption/ionization (MALDI) mass spectrometry imaging (MSI), enables the high-resolution mapping of metabolites in tissues at the mesoscale^[64]6. This methodology allows the identification, quantification and spatial distribution of multiple classes of metabolites such as small molecules^[65]7,[66]8, lipids^[67]9,[68]10, glycogen and glycan-related complex carbohydrates^[69]11,[70]12, thereby providing critical insights into cellular metabolism and disease mechanisms. Computational workflows are being developed to align and co-analyse high-dimensional datasets produced from spatial metabolomics datasets^[71]5,[72]13,[73]14, bringing pathway enrichment and network analyses into spatial metabolism and enabling future advancements that promise a more comprehensive and nuanced understanding of cellular and tissue architecture. The field is thus poised for important contributions to elucidating disease mechanisms and potential therapeutic interventions. For example, spatial metabolomics has provided insights into new skeletal myofiber subtypes^[74]15, dopaminergic lipid homeostasis during Parkinson’s disease^[75]16, and metabolic dependencies of glycogen in both Ewing sarcoma^[76]11 and pulmonary fibrosis^[77]17. Biological organisms and tissues operate in three-dimensional (3D) space. While a number of new technologies are presented for spatial transcriptomics^[78]18–[79]20, current methodologies and data generated for spatial metabolomics are predominantly confined to two-dimensional (2D) analyses. The usefulness of 3D metabolomics has been demonstrated through manual co-registration and alignment of brightfield images^[80]21–[81]23, but substantial manual input remains a major barrier to widespread adaptation and application of 3D metabolism data into an integrated workflow^[82]24. This limitation stands as a barrier to understanding the biological function of metabolic networks in 3D. One existing approach to 3D metabolic imaging is through magnetic resonance spectroscopy; however, this technique is constrained by a limited set of detectable metabolites and offers insufficient spatial resolution^[83]25. This is especially problematic in heterogeneous structures such as the rodent brain in which the cellular composition of distinct brain regions changes at a spatial gradient that is substantially finer than the resolution offered by magnetic resonance spectroscopy. Advancing to a 3D metabolome at the mesoscale represents the next major milestone, serving to bridge the gap between 2D and 3D. Achieving 3D metabolomics at this scale would enable the mapping of metabolic interactions and networks, reflecting the spatial complexities inherent in biological systems and bridging the gap in understanding from cellular to organismal levels. Such a shift from 2D to 3D would provide unprecedented insights into the spatial heterogeneity of metabolic activities within cells and tissues, facilitating a deeper understanding of the connection between molecules and physiology. Here, we introduce MetaVision3D, a computational framework for the automated generation of 3D metabolome models from serial tissue sections. MetaVision3D represents a major advancement in spatial metabolomics, offering algorithms designed to reconstruct the 3D metabolome of complex diseases or tissues ([84]Fig. 1). MetaVision3D uses an automated alignment framework through computer vision techniques (MetaAlign3D) and normalization steps to account for intraslice signal variabilities (MetaNorm3D) and then performs imputation (MetaImpute3D) and interpolation algorithms (MetaInterp3D) to improve overall 3D rendering visualization ([85]Fig. 1). The innovation lies both in the precision and resolution of the spatial data as well as in the workflow’s ability to compensate for experimental and technical variabilities inherent to MALDI imaging. MetaVision3D serves as a critical bridge between existing imaging modalities, enabling mesoscale spatial resolution and a comprehensive characterization of metabolic distributions within the brain. Leveraging MetaVision3D, we created the 3D mouse brain metabolome atlas in an interactive online database and web server ([86]https://metavision3d.rc.ufl.edu). Fig. 1 |. MetaVision3D, a computer vision pipeline for the generation of spatial metabolism in 3D. Fig. 1 | [87]Open in a new tab Computational framework for MetaVision3D for the generation of spatial metabolome of mouse hemibrain in 3D. MetaVision3D uses an automated alignment framework through computer vision and normalization steps to account for intraslice signal variabilities and then performs imputation and interpolation algorithms to improve overall 3D rendering visualization. Created with [88]BioRender.com. Results AI-driven alignment of 2D MALDI imaging datasets The first step towards building a 3D spatial metabolomics atlas of the brain is the ability to seamlessly align serial tissue sections subjected to MALDI imaging in an automated fashion. Here, we developed a powerful MALDI imaging alignment module (MetaAlign3D) in MetaVision3D based on the principle of enhanced correlation coefficient (ECC) maximization^[89]26, which has been adopted for image alignment in the field of computer vision, a type of artificial intelligence (AI) focusing on image registration tasks. Using this algorithm, MALDI images are systematically aligned through an iterative process that maximizes the correlation coefficient between adjacent sections directly from data array of MALDI images. Utilizing the first section as the starting point, each subsequent image was subjected to parametric transformations—comprising rotations, translations and, in some instances, scaling and skewing—to identify the optimal overlay ([90]Fig. 2a). The ECC maximization principle functioned as the guiding metric in this process, providing a quantitative measure of similarity that was optimized until the alignment of molecular patterns across serial sections reached the peak of the correlation function ([91]Methods). To test MetaAlign3D, we applied it to align in five sequential sagittal-cut MALDI image sections from the medial plan of a mouse hemibrain ([92]Fig. 2b and [93]Extended Data Fig. 1a). Compared with manual fit ([94]Methods), MetaAlign3D achieved superior alignment ([95]Fig. 2b and [96]Extended Data Fig. 1a). This was indicated by the enhanced overlap accuracy of the anatomical landmarks highlighted by the metabolite distribution across the brain section ([97]Fig. 2b and [98]Supplementary Video 1). Fig. 2 |. MetaAlign3D for the automated alignment of serial MALDI imaging tissue sections. Fig. 2 | [99]Open in a new tab a, Schematics of the computation workflow for the automated alignment of sequential MALDI imaging tissue powered by MetaAlign3D. Created with [100]BioRender.com. b, MetaAlign3D versus manual fit for five serial sagittal sections cut from the medial side of a mouse hemibrain. Created with [101]BioRender.com. c, MetaAlign3D versus manual fit for six sagittal sections cut from the medial side to lateral side of a mouse hemibrain with major shift in tissue size. Created with [102]BioRender.com. d, Statistical measures of alignment and fit quality between manual fit and MetaAlign3D, ECC, SSIM and MSE. The box-and-whisker plot shows the median (line), interquartile range (box) and variability (whiskers extending to the maximum and minimum data points) for 11 different lipid classes across n = 79 brain sections. e, Schematics of the experimental workflow MALDI imaging of mouse hemibrain at 50 μm resolution. A total of 79 sections were acquired. Created with [103]BioRender.com. f, MetaAlign3D versus manual fit for the 79 serial sagittal sections cut from a mouse hemibrain for the creation of spatial metabolome atlas in 3D. Schematics created with [104]BioRender.com. To test the ability of MetaAlign3D to fit serial tissue sections of different sizes, we performed MALDI imaging on tissue sections derived from the medial and lateral side of the mouse sagittal hemisected brain ([105]Fig. 2c and [106]Extended Data Fig. 1b). MetaAlign3D corrected for distortion due to size differences between lateral and medial brain sections and maintained anatomical alignment highlighted by metabolic features ([107]Fig. 2c). This improvement is particularly evident when juxtaposed against manual alignment efforts, where notable imperfections were observed ([108]Fig. 2c). Statistical measures of alignment and fit quality included ECC for geometric transformation^[109]26, structural similarity index measure (SSIM) to compare image similarities^[110]27 and mean squared error (MSE) to quantify differences between serial images^[111]28. MetaAlign3D of the entire volume demonstrates substantial improvement over the manual fitting technique for all parameters assessed ([112]Fig. 2d). Construction of the 3D spatial metabolome of the brain We further demonstrate the scope and utility of MetaAlign3D in an ambitious task of constructing the first mesoscale mouse brain 3D metabolomics atlas. To achieve this, we performed cryosectioning of 10-μm-thick brain sections from a mouse hemibrain. Importantly, sections are 50 μm apart (z axis), corresponding to the MALDI imaging spatial resolution of 50 μm (x and y axes). This strategy allows the creation of a 3D brain atlas at 50 μm resolution ([113]Fig. 2e). A total of 79 serial brain sections were collected from cryosectioning and subjected to MALDI imaging. We used MetaAlign3D and manual fit to connect all 79 brain sections and created a 3D rendering of the metabolic features ([114]Methods). We rendered lysophosphatidylethanolamine (LPE) 16:1 [M – H]^− in 3D view using ImageJ ([115]Fig. 2f and [116]Methods) to allow visualization of detailed brain anatomical structures ([117]Fig. 2f). For example, the structure of the corpus collosum is much more pronounced after MetaAlign3D compared with manual fit ([118]Fig. 2f and [119]Supplementary Video 1). Upon completion of the alignment, a series of challenges became apparent. First, due to the inherent characteristics of the MALDI workflow, discernable variabilities were observed in certain metabolic features both within and between slides even after normalization to total ion current ([120]Extended Data Fig. 2). Such variations pose challenges for ensuring consistent representations of the metabolic landscapes across sections. In addition, the imperfections associated with handling and sectioning frozen brain tissue at 10 μm became evident, as several sections exhibited missing regions—probably attributed to the fragile nature of the frozen brain ([121]Extended Data Fig. 4a). These findings underscore the complexities involved in the experimental aspects of such atlas construction and point towards areas requiring further refinement and methodological adaptation. Although MALDI imaging analyses were normalized to total ion current, interslide normalizations are not commonly performed. Interslide variability exists, leading to inconsistencies in the representation of metabolites across serial sections ([122]Extended Data Fig. 2a). Such disparities could potentially skew the interpretative outcomes of the atlas. To account for these issues, we instituted a normalization strategy, referred to as MetaNorm3D, for each metabolite, using the median value of the section as the reference point ([123]Methods). By normalization to the tissue section median, we markedly improved the intersection consistency ([124]Extended Data Fig. 2b). This ensured a smoother transition of metabolite intensities between serial sections. As a result, the normalized dataset provided a more contiguous and coherent display of the metabolic landscape, substantially reducing the technical variabilities associated with the MALDI process. Phosphatidylinositol phosphate (PIP) 38:4 [M – H]^− and phosphatidylinositol (PI) 36:4 [M – H]^− are shown as examples ([125]Extended Data Fig. 3). To improve visualization of the 3D spatial distribution, including challenges stemming from the physical handling of brain sections, which occasionally led to missing regions or gaps in the tissue, we developed an advanced AI-driven imputation module named MetaImpute3D in MetaVision3D to fill in these gaps ([126]Fig. 3a). For these processes, we utilized adjacent sections—two sections from either side of the compromised section—as references. Drawing data from these intact