Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2022 Jan 16.
Published in final edited form as: J Am Soc Mass Spectrom. 2020 Jun 30;31(12):2547–2552. doi: 10.1021/jasms.0c00128

A Versatile Platform for Mass Spectrometry Imaging of Arbitrary Spatial Patterns

Kenneth P Garrard 1,2,3, Måns Ekelöf 1,, Sitora Khodjaniyazova 1, M Caleb Bagley 1, David C Muddiman 1,3,*
PMCID: PMC8761386  NIHMSID: NIHMS1723015  PMID: 32539373

Abstract

A vision-system driven platform, RastirX, has been constructed for mass spectrometry imaging (MSI) of arbitrary two-dimensional patterns. The user identifies a region of interest (ROI) by drawing on a live video image of the sample with the computer mouse. Motion commands are automatically generated to move the sample to acquire scan data for the pixels in the ROI. Synchronization of sample stage motion with laser firing and mass spectrometer (MS) scan acquisition is fully automated. RastirX saves a co-registered optical image and the scan location information needed to convert raw MS data into imzML format. Imaging an arbitrarily shaped ROI instead of the minimal enclosing rectangle reduces contamination from off-sample material and significantly reduces acquisition time.

Keywords: Mass Spectrometry Imaging, Arbitrary Region of Interest, MALDESI, Vision-System

Graphical Abstract

graphic file with name nihms-1723015-f0004.jpg

A mouse femur is imaged with minimal ablation of off-sample material using IR-MALDESI and the RastirX vision-based control system.

Introduction

The two most common MS imaging modes, one-way raster (scanning in only one direction) or meandering (alternate scans in opposite directions), across the smallest enclosing rectangle or convex hull are not ideal for some sample types. Bones, seedlings, leaves, human hair, and forensic samples such as textile fibers and fingermarks may have irregular shapes with gaps and tears. Not only is imaging a larger area than necessary inefficient, fragile materials may deteriorate during imaging and the order in which various morphological features of a sample are irradiated with the laser may be important. Responding to this need, an MS imaging platform first developed for IR-MALDESI1 in 2012 has been tailored for scanning arbitrary patterns on a sample.

This modified platform, denominated RastirX, allows the region of interest (ROI) to be any shape. There are a few similar flexible imaging platforms currently available to the MSI community. OpenMZxy2 is a Python-based low temperature plasma MSI system using low-cost hardware (Raspberry Pi). However, resolution is limited to 1 mm pixel spacing over a rectangular area with maximum dimensions of 100×100 mm, there is no integrated vision system, and sample motion is not tightly coupled to scan acquisition. microMS3 is a microscopy guided approach, also open-source and written in Python, that supports multiple MSI platforms for single cell imaging. However, the microscopy imaging is off-line, requiring point-based similarity registration to identify, locate, and pattern target clusters which must then be mapped to instrument coordinates for MSI. In contrast to both OpenMZxy and microMS, RastirX is limited in resolution and image size only by camera resolution, accuracy and range of motion control and laser spot size.

Methods

Hardware

There are six hardware components of the IR-MALDESI imaging system: a Q Exactive HF-X mass spectrometer (Thermo Scientific, Bremen, Germany); an ESP300 motion controller with motorized GTS-70 and LTA-HS linear axes (MKS Instruments, Andover, MA) and manually actuated vertical axis (NT66-508, Edmund Optics, Barrington, NJ); a Point Grey Flea USB camera with DCI 4K resolution (FLIR Systems, Wilsonville, OR) and a fixed focal length lens (Edmund Optics 25 mm HR63780 manual focus F1.8 to F16); a 10 kHz pulse rate mid-IR laser (JGMA Inc., Burlington, MA); a programmable microcontroller synchronizing stage motion, laser firing and scan acquisition (Arduino, Ivrea, Italy); and a Windows PC (Dell, Round Rock, TX) running the RastirX graphical user interface in a Matlab environment (R2014a, Natick, MA). See supplemental Figures S1 and S2 for system configuration details. The camera is mounted such that pixel resolution at the nominal stage height for imaging is 7.5 μm with a 30×16 mm field-of-view (FOV). At the closest possible working distance, the resolution is 4 μm and the FOV is 16×8.5 mm.

Software

The RastirX graphical user interface (see supplemental Figure S3) and function modules are written in Matlab. There are 62 modules comprising a total of 7000 lines of code, 40% of which are comments documenting the meaning and structure of the code. The Matlab image acquisition and image processing toolboxes are required. Samples can be imaged with one-way or meandering motion over a rectangular ROI or any closed polygon drawn inside the rectangle with the mouse. Additionally, the polygon can be edited scan-by-scan to remove unwanted interior regions. The user specifies horizontal and vertical spacing in mm units. Alternatively, the number of scans in either dimension can be entered and RastirX will calculate the required spacing.

The Matlab image acquisition toolbox allows RastirX to be used with almost any USB, GigE, GenICam, DCAM or CameraLink digital camera or with a webcam. Pixel resolution is the critical camera parameter for RastirX. Multiple laser systems and MS instruments have interfaced to RastirX; the principal requirements being a digital signal to fire the laser, another to trigger scan acquisition, and an output from the MS when it is ready to acquire a spectrum. To date, only Newport motion controllers have been used; however, RastirX needs only seven fundamental building blocks for setup and image acquisition: reset, stop, home, querypositionandstatus, movetoxyz, triggerscan, and waitforscancompletion. Additional requirements of the motion control system are two TTL signals: an output indicating that a command has been completed, and an input triggering movement to the next position during imaging.

The Arduino microcontroller synchronizes stage motion with scan acquisition and laser firing. RastirX communicates with the Arduino via USB, using five commands to acquire an image: reset, datacomplete, run, cancel, and query. An additional command triggers the laser to fire a single burst of pulses. During imaging, the Arduino sends a progress message to RastirX when the laser is triggered and in response to the query command. The microcontroller program is less than 500 lines of C code and supports two instrument handshake modes and two different types of laser firing mode: Burst-mode (JGMA) with pulse-counting feedback4 and single-shot Q-switched (Opotek).

Image Acquisition

While the laser and camera are rigidly mounted and adjacent, the laser spot is not superimposed on the video camera FOV. Also, their positions are occasionally adjusted for different sample types or when the MALDESI source is decoupled from the MS for cleaning. Camera pixels must be calibrated with respect to the stage coordinate system for RastirX to automatically generate motion commands that move the sample under the laser during imaging. After homing, the stages are moved to a predefined CAMERA location and a precision scale is used for calibration as shown in Figure 1. In Figure 1A the user has drawn a line 1316 pixels long between 10 mm tick marks on a Starrett scale, giving 7.6 μm per camera pixel. The scale is then replaced by a glass slide covered by ZAP-IT® laser alignment paper (Zap-it Laser, Concord, NH) and the stages are moved to the predefined LASER position. After firing a burst of laser pulses, the stages are moved back to the CAMERA position and the burn spot is located by the user with the laser spot tool. This could also be done on the sample being imaged. This provides the scale factor and offsets mapping camera pixel coordinates for the user’s ROI to X and Y coordinates of the stages. This process is illustrated in supplemental Figure S4.

Figure 1.

Figure 1.

Elements of the RastirX User Interface.

A) The video camera is calibrated using a precision scale and the calibration line tool. The user draws a line over the image of the scale and enters its length in the Pixel Calibration box. RastirX uses the length of the line in camera pixel units to calculate pixels/mm and mm/pixel. While drawing the calibration line the user can use the zoom and pan tools for the video image to accurately position the endpoints. B) Using the ROI rectangle tool, the user identifies an area of the sample to be imaged (cyan box) and enters dimensional parameters in the Scan Region Identification panel. Either the number of spots and lines or the spot and line spacing can be entered and held constant. RastirX updates the unconstrained quantities as the ROI is drawn or resized.

As illustrated in Figure 1B, the user then draws a rectangular ROI (around one of two mouse bones) on the optical image of the sample. The LOAD button generates a motion command stream for the entire image and sends the selected options (e.g., number of laser pulses per scan) to the microcontroller. Clicking the RUN button initiates stage motion and synchronization of the laser with MS scan acquisition. Progress is reported both on the RastirX screen and in the Matlab command window. RastirX fills the stage controller command buffer as needed to maintain continuous stage motion and data acquisition. For example, as shown in Figure 1B, the entire ROI rectangle is imaged in a meandering motion path with 150 μm spot and line spacing.

A log file documenting the setup and acquisition process (i.e., all RastirX commands and any response) is maintained with a timestamp for each command. The user interface screen can be saved at any time with a toolbar icon. Support for ablation-based 3D imaging5 is provided by repeating the motion path any number of times with an optional pause in between layers so the user can restart the MS to save each layer into a new raw file.

The ROI Editor

In many cases the smallest rectangular ROI enclosing the sample may contain significant off-tissue area. For fragile and time-sensitive samples and samples embedded in a fixing or matrix compound it may be advantageous to image an arbitrarily shaped smaller area. In RastirX the ROI Editor tool allows the user to draw a polygon within the rectangular ROI to define this smaller shape. The process is shown in Figure 2. In Figure 2A the ROI Editor has been launched from the RastirX toolbar and the user has drawn a polygon tightly enclosing the boundary of one bone. The polygon points can be moved with the mouse to refine the shape and points can be added and deleted. If further editing is required, the ROI Mask Editor (Figure 2B) can be used to refine the polygon, enabling or disabling any number of pixels in the image. Note that pixels are shown by this tool as rectangles whose size depends on the previously discussed setup and calibration steps and the current spot and line spacing. A grid showing this can be toggled on and off with a toolbar icon. After the user is finished editing the ROI and closes both the Mask Editor and the ROI Editor, the motion path for the edited image is plotted as shown in Figure 2C using an icon on the RastirX toolbar.

Figure 2.

Figure 2.

The ROI Editor.

A) The ROI Editor polygon tool can be used to draw any closed polygon inside the rectangular ROI to delimit the area of the sample that is imaged. The polygon can be edited and moved after it is drawn. When the ROI Editor is launched the last saved polygon can be recovered or the user can draw a new one. B) Further refinement of the ROI can made using the mask editor and mouse to include or exclude any pixel in the rectangular ROI. C) The motion path and the pixels that are imaged can be plotted by RastirX.

Results and Discussion

Imaging results for two samples are shown in Figure 3: a mouse femur6 (Figure 3A) and an Arabidopsis thaliana seedling7 (Figure 3B). In both cases using an arbitrarily shaped ROI significantly reduces data acquisition time and minimizes the amount of off-sample material injected into the MS. For both samples the reduction was about 65%. Figure 3A shows an optical image of a mouse femur with tightly drawn ROI, motion path, and spatial distribution of cholesterol [M+H−H2O]+ ion. Supplemental Figure S5 is a photo showing image acquisition from a bone on the IR-MALDESI platform. In Figure 3B, a visual image with ROI, the motion path, and the molecular image for m/z 219.0265 for a seedling are shown. In the second example, using an arbitrary ROI decreased contamination from the agarose under the sample and the reduction in acquisition time to 8 mins and 17 seconds limited the biological effects on sample metabolites associated with dehydration7. Supplemental Figure S6 illustrates the time and space savings of imaging with ROIs tailored to the sample shape.

Figure 3.

Figure 3.

Imaging Arbitrarily Shaped Samples.

A) A video image of a mouse femur fixed in alginate is shown along with the RastirX generated motion path to image the enclosing ROI and the resulting ion image for cholesterol. Not only is unwanted material excluded from the image the number of scans and acquisition time is reduced by 65%. B) An Arabidopsis thaliana seedling on agarose gel is shown on the left with an enclosing ROI. In the center is the RastirX generated motion path for imaging and on the right is the ion image for m/z 219.0265. Use of an arbitrary ROI reduces the duration of the image acquisition by about 65%, mitigates dehydration of the fragile biological sample, and the injection of agarose.

Integration with MSI Software

When an image is acquired, RastirX saves a text information file containing the imaging parameters, the X and Y coordinates of each scan, and an optical image at the CAMERA location. These files are subsequently used to convert the RAW instrument file, which contains the scans in the order they were acquired into a molecular image file (imzML format) and a co-registered optical overlay file for use by the MSI visualization and analysis package MSiReader8,9, Thermo ImageQuest™, or any other program supporting the imzML format. This workflow is shown in supplemental Figure S7.

Conclusions

RastirX is a key component of the IR-MALDESI imaging platform that is easily adapted to other MS imaging platforms for complete control over the image acquisition process. The addition of arbitrarily shaped ROIs enables effective imaging of difficult sample types. Future plans include multiple ROIs with independent imaging parameters, improved support for 3D imaging with a motorized Z stage and a more accurate planar XY stage, new custom mid-IR lasers, and built-in routines for microtiter plates10. RastirX will be released under an open-source license in the near future.

Supplementary Material

Supplemental

Acknowledgements

All mass spectrometry measurements were made in the Molecular Education, Technology, and Research Innovation Center (METRIC) at NC State University. Funding for this work was made possible through grants from the NIH (R01GM087964, R01AI111891) and North Carolina State University.

All animal experiments were performed in accordance with locally-approved IACUC protocols.

The online version of this article contains supplementary material, which is available to authorized users.

Footnotes

The authors declare no competing financial interest.

Supporting Information

Seven additional figures with details of the IR-MALDESI platform and the RastirX user interface components.

References

  • 1.Robichaud G, Barry JA, Garrard KP, Muddiman DC Infrared Matrix-Assisted Laser Desorption Electrospray Ionization (IR-MALDESI) Imaging Source Coupled to an FT-ICR Mass Spectrometer. J. Am. Soc. Mass Spectrom 24, 92–100 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Maldonado-Torres M, Lopez-Hernandez JF, Jimenez-Sandoval P, Winkler R, ‘Plug and Play’ assembly of a low-temperature plasma ionization mass spectrometry imaging (LTP-MSI) system. J. Proteomics 102, 60–65 (2014). [DOI] [PubMed] [Google Scholar]
  • 3.Comi TJ, Neumann EK, Do TD, Sweedler JV, microMS: A Python Platform for Image-guided Mass Spectrometry Profiling. J. Am. Soc. Mass Spectrom 28, 1919–1928 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Ekelöf M, Manni J, Nazari M, Bokhart M, Muddiman DC Characterization of a novel miniaturized burst-mode infrared laser system for IR-MALDESI mass spectrometry imaging. Anal Bioanal Chem. 410, 2395–2402 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Bai H, Khodjaniyazova S, Garrard KP, Muddiman DC, Three-Dimensional Imaging with Infrared Matrix-Assisted Laser Desorption Electrospray Ionization Mass Spectrometry. J. Am. Soc. Mass Spectrom 31, 292–297 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Khodjaniyazova S, Hanne NJ, Cole JH, Muddiman DC Mass spectrometry imaging (MSI) of fresh bones using infrared matrix-assisted laser desorption electrospray ionization (IR-MALDESI). Anal. Methods 11, 5929–5938 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Bagley MC, Stepanova A, Ekelöf M, Alonso JM, Muddiman DC, Development of a Relative Quantification Method for IR-MALDESI Mass Spectrometry Imaging of Arabidopsis Seedlings. Rapid Commun. Mass Spectrom 34, rcm.8616 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Robichaud G, Garrard KP, Barry JA, Muddiman DC MSiReader: An Open-Source Interface to View and Analyze High Resolving Power MS Imaging Files on Matlab Platform. J. Am. Soc. Mass Spectrom 24, 718–721 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Bokhart MT, Narzari M, Garrard KP, Muddiman DC MSiReader v1.0: Evolving Open-Source Mass Spectrometry Imaging Software for Targeted and Untargeted Analyses. J. Am. Soc. Mass Spectrom 29, 8–16 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Nazari M, Ekelöf M, Khodjaniyazova S, Elsen NL, Williams JD, Muddiman DC Direct screening of enzyme activity using infrared matrix-assisted laser desorption electrospray ionization. Rapid Commun Mass Spectrom. 31, 1868–1874 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supplemental

RESOURCES