Articles

Analyzing Mass Spectrometry Imaging Data: Processing, Statistics, and Multimodal Integration

A raw acquisition is a hyperspectral cube, not an answer. Getting from one to the other requires a pipeline with its own failure modes, its own software landscape, and its own statistics
Updated
Written byTrevor J Henderson
A bioinformatician reviews a segmented tissue image and a peak-labelled spectrum on a monitor, a flowchart sketched in a notebook beside them.

A gigapixel molecular dataset only becomes an answer once it passes through a processing pipeline as deliberate as the wet-lab method that produced it.

Flow (2026)

Turning a completed acquisition into mass spectrometry imaging data analysis output is a substantial undertaking in its own right — a single imaging run produces a full spectrum at every pixel across a grid that can number in the tens of thousands, and none of that is interpretable until it has passed through preprocessing, been reduced to meaningful features, and been analysed statistically with methods that account for its spatial structure.


Key Takeaways

  • Preprocessing steps are not independent. Doing them in the wrong order compounds errors rather than merely adding noise.
  • Spatial segmentation should use pixel position as well as spectral content, since neighbouring pixels are more likely to share a class than distant ones.
  • The open-source and commercial software landscape splits along two independent axes: open versus proprietary, and purpose-built for imaging versus adapted from general mass spectrometry.
  • Spatial statistics can formally test whether a pattern is real, rather than relying on visual impression alone.
  • Multimodal integration inherits every upstream decision: registration accuracy, resolution mismatch, and preprocessing choices all propagate into the joint analysis.

The MSI Data Pipeline

An imaging acquisition produces a hyperspectral cube — two spatial dimensions and one spectral dimension, with a full mass spectrum recorded at every pixel. That structure is what makes MSI data analysis a different discipline from either conventional mass spectrometry or conventional image analysis, since it inherits difficulties from both.

The pipeline runs in a fixed sequence, and the sequence matters because later steps depend on earlier ones having been done correctly.

Stage

What It Does

Consequence of Getting It Wrong

Baseline correction

Removes chemical and instrumental background that would otherwise be counted as signal

Peak picking on an uncorrected baseline inflates the apparent number and intensity of features

Smoothing and denoising

Reduces random noise while preserving genuine peak shape

Too aggressive smoothing merges or distorts adjacent peaks; too little leaves noise mistaken for features

Peak picking

Converts a continuous spectrum into a discrete list of features at each pixel

The single most consequential step. Errors here propagate into every later stage

Spectral alignment

Corrects small mass shifts between pixels or runs so the same species is recognised consistently

Without it, one true species can appear as several features, or several species can merge into one

Normalization

Corrects for pixel-to-pixel variation in total signal unrelated to the biology

Normalizing before alignment compounds misalignment rather than correcting for it

Table 1. The standard MSI preprocessing sequence. The order reflects genuine dependencies rather than convention: each stage assumes the previous one was done correctly.

Working in analytical science?

Register for a FREE Separation Science account to subscribe to the Separation Science Newsletter.

Subscribe for free

That dependency is the point most worth internalising. Peak picking performed on a poorly baseline-corrected spectrum does not merely add noise to a separately valid analysis; it changes which features exist to be analysed at all, and every downstream statistic inherits that error. The resolution and coverage decisions that determine what enters this pipeline in the first place are covered in Spatial Resolution vs. Sensitivity in MS Imaging: The Fundamental Trade-off.

Normalization and Batch Correction

Total ion current normalization, dividing each pixel’s spectrum by its own total signal, is the default approach and a reasonable starting point, correcting for pixel-to-pixel differences in overall ionisation efficiency that have nothing to do with the biology of interest.

It is not a universal fix. Where regional tissue composition genuinely differs, which is frequently the entire point of a spatial experiment, total signal itself varies for real biological reasons, and dividing by it can suppress or distort exactly the contrast the experiment was designed to detect. The general principle established for quantitative imaging, that ion suppression varies with local chemical environment, applies directly here: a normalization method that assumes uniform total signal across regions is making an assumption that spatial heterogeneity itself violates.

Three practical responses address this rather than accepting a single default.

  1. Try more than one normalization approach. Total ion current, median, and reference-ion normalization each make different assumptions, and checking whether a finding survives more than one is more informative than picking one and reporting it.
  2. Use an internal standard where quantification matters. An isotopically labelled analogue applied uniformly provides a reference that experiences the same regional suppression as the analyte, which no post-hoc normalization of total signal can replicate.
  3. Correct for batch effects explicitly when combining runs. Multi-sample or multi-day studies introduce run-to-run variation from instrument drift and reagent lot changes that pixel-level normalization within a single run cannot address, and requires its own correction step applied across samples rather than within one.

Spatial Segmentation and Statistics

Segmentation partitions an image into regions of similar chemical composition, and the useful distinction is between methods that use only spectral content and methods that use spectral content together with pixel position.

An imaging-specific approach illustrates why the distinction matters. Cardinal, an open-source package built specifically for statistical analysis of MS imaging experiments, introduces a method called Spatial Shrunken Centroids for unsupervised image segmentation, which combines spatial distance information with the mixture modelling and regularisation underlying Nearest Shrunken Centroids, an established method originally developed for microarray classification. The spatial component matters because neighbouring pixels in real tissue are more likely to belong to the same structure than distant ones, and a segmentation method that ignores position treats every pixel as independent, discarding information a spatial method can use.

Analysis Type

Question It Answers

What It Requires

Unsupervised segmentation

What distinct chemical regions exist in this tissue, without prior labels?

A method for selecting the number of segments and the informative ions, since neither is known in advance

Supervised classification

Which of these predefined classes does each pixel belong to?

Labelled training data and a validation strategy to estimate classification error honestly

Spatial statistics

Is this apparent pattern actually non-random, or could it arise by chance?

A formal test that accounts for spatial autocorrelation rather than treating pixels as independent observations

Table 2. Three distinct analysis modes, separated by the question each answers. Segmentation and classification are often conflated; they require different evidence.

The classification row deserves particular attention because its requirement, estimating classification error by validation, is easy to skip and consequential when skipped. A classifier that has not been validated on held-out data can report high apparent accuracy purely by having learned the training set, which is a familiar failure mode from other areas of statistics applied here with the same force. Cardinal\u2019s classification functionality explicitly selects informative ions and estimates resulting error through cross-validation for exactly this reason.

Spatial statistics proper, testing whether an observed pattern is more clustered or more regular than chance would produce, is the least commonly applied of the three and often the most informative, because it converts a visual impression of a pattern into a quantified claim. A distribution that looks structured to the eye may or may not be statistically distinguishable from a random arrangement with the same overall intensity distribution, and only a formal test settles the question.

The Software Landscape

Choosing software is genuinely a two-axis decision, and understanding both axes independently is more useful than a simple list of package names.

The first axis is open versus commercial. Cardinal was developed explicitly as an open-source alternative, its developers positioning it directly against commercial platforms on that basis. The second axis is purpose-built versus general-purpose. Cardinal was also positioned against existing general-purpose mass spectrometry packages, on the basis that those tools were designed for conventional spectra rather than for the specific structure of imaging data, where spatial position is itself information rather than incidental metadata.

Those two axes, taken together, describe the actual landscape a reader is choosing within.

  • Open and imaging-specific. Cardinal is the clearest example, purpose-built for MSI statistical analysis with free access to source code and methodology.
  • Open and general-purpose. Packages built for conventional mass spectrometry that can be adapted to imaging data but were not designed around its spatial structure.
  • Commercial and imaging-specific. Vendor platforms built specifically for MSI workflows, typically bundled with instrument acquisition software and offering integrated support.

Annotation, which sits downstream of segmentation and classification and asks what a given feature actually is rather than where it varies, draws on a parallel open-versus-curated distinction of its own, covered fully in Metabolite Annotation and Databases for MS Imaging. The two decisions, which segmentation tool and which annotation database, are independent and both worth making deliberately rather than accepting instrument-bundled defaults by convenience.

Integrating MSI With Other Spatial Data

Once an MSI dataset has been registered to another spatial modality, as covered in Coregistration With Histology and Multimodal Imaging, the analytical question shifts from processing one dataset to relating two. That inherits every upstream decision from both sides: registration accuracy sets a floor on how confidently a molecular signal can be assigned to a specific cell or region, resolution mismatch between modalities determines what scale of joint analysis is even meaningful, and preprocessing choices on the MSI side still apply before any integration begins.

The computational methods for the non-MSI side of that integration, cell segmentation and cell typing for imaging- or sequencing-based spatial platforms, are a substantial field of their own outside mass spectrometry. Our sister publication\u2019s guide to analyzing spatial biology data covers that territory directly, including the Python and R ecosystem conventions that dominate spatial transcriptomics analysis and the cell segmentation step that a joint MSI-plus-transcriptomics dataset also depends on. The parallel is instructive: MSI segments pixels into chemical regions using spatial position as one axis of evidence, while spatial transcriptomics segments images into cells before any expression analysis begins. Both fields converged on the same principle, that position is data rather than metadata, from different starting points.

This section develops each stage in depth. Software options and processing parameters specific to MSI are covered in MS Imaging Data Processing and Software. Registering and jointly analysing MSI with spatial transcriptomics specifically is treated in Multimodal Integration: MS Imaging With Spatial Transcriptomics. Machine learning approaches to segmentation, classification, and feature extraction are covered in Machine Learning for Mass Spectrometry Imaging Data. And the pharmaceutical application area that has adopted MSI data analysis most extensively is covered in MS Imaging in Pharma: Drug Distribution and the Emerging Frontier.

For where data analysis sits within the wider spatial landscape, see Spatial Analysis in Analytical Science: Mass Spectrometry Imaging and Spatial Omics, and for the fundamentals of how the data this pipeline processes is actually acquired, Mass Spectrometry Imaging: Principles, Techniques, and Applications.

This article was produced under Separation Science's AI Editorial Guidelines.

Frequently Asked Questions (FAQs)

  • How do you analyze mass spectrometry imaging data?

    Through a defined pipeline: baseline correction and smoothing, peak picking to convert continuous spectra into discrete features, spectral alignment across pixels, and normalization. The processed data then supports spatial segmentation to find chemically distinct regions, classification against predefined categories, and spatial statistics to test whether observed patterns are genuinely non-random.

  • What software is used for MSI?

    Options split along two axes: open-source against commercial, and purpose-built for imaging against adapted from general mass spectrometry. Cardinal is an established open-source R package built specifically for MSI statistical analysis, offering spatially aware segmentation and validated classification. Commercial platforms are typically bundled with instrument acquisition software.

  • How do you normalize MS imaging data?

    Total ion current normalization, dividing each pixel by its own total signal, is the common default. It assumes total signal is comparable across regions, which spatial heterogeneity itself can violate, so trying more than one normalization approach and checking whether findings survive is more defensible than relying on a single method. Internal standards provide the most reliable correction where quantification matters.

Add Separation Science as a preferred source on Google

Add Separation Science as a preferred Google source to see more of our trusted coverage

Meet the Author(s):

  • Trevor Henderson

    Trevor Henderson, PhD, is a veteran Content Innovation Director and scientific strategist at LabX Media Group. With a career spanning three decades, Trevor is a recognized expert in scientific writing, creative content creation, and technical editing.

    His academic pedigree in human biology, physical anthropology, and community health provides him with a rigorous analytical framework, which he applies to developing industry-leading content for scientists and lab technicians. Since 2013, Trevor has led content innovation initiatives that drive engagement within the laboratory technology sector.

    View Full Profile

Here are some related topics that may interest you:

Related Content