Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2022 Dec;88(6):2358-2370.
doi: 10.1002/mrm.29418. Epub 2022 Sep 11.

NIfTI-MRS: A standard data format for magnetic resonance spectroscopy

Affiliations

NIfTI-MRS: A standard data format for magnetic resonance spectroscopy

William T Clarke et al. Magn Reson Med. 2022 Dec.

Abstract

Purpose: Multiple data formats in the MRS community currently hinder data sharing and integration. NIfTI-MRS is proposed as a standard spectroscopy data format, implemented as an extension to the Neuroimaging informatics technology initiative (NIfTI) format. This standardized format can facilitate data sharing and algorithm development as well as ease integration of MRS analysis alongside other imaging modalities.

Methods: A file format using the NIfTI header extension framework incorporates essential spectroscopic metadata and additional encoding dimensions. A detailed description of the specification is provided. An open-source command-line conversion program is implemented to convert single-voxel and spectroscopic imaging data to NIfTI-MRS. Visualization of data in NIfTI-MRS is provided by development of a dedicated plugin for FSLeyes, the FMRIB Software Library (FSL) image viewer.

Results: Online documentation and 10 example datasets in the proposed format are provided. Code examples of NIfTI-MRS readers are implemented in common programming languages. Conversion software, spec2nii, currently converts 14 formats where data is stored in image-space to NIfTI-MRS, including Digital Imaging and Communications in Medicine (DICOM) and vendor proprietary formats.

Conclusion: NIfTI-MRS aims to solve issues arising from multiple data formats being used in the MRS community. Through a single conversion point, processing and analysis of MRS data are simplified, thereby lowering the barrier to use of MRS. Furthermore, it can serve as the basis for open data sharing, collaboration, and interoperability of analysis programs. Greater standardization and harmonization become possible. By aligning with the dominant format in neuroimaging, NIfTI-MRS enables the use of mature tools present in the imaging community, demonstrated in this work by using a dedicated imaging tool, FSLeyes, for visualization.

Keywords: MRS; MRSI; open data format; spectroscopy; visualization.

PubMed Disclaimer

Figures

FIGURE 1
FIGURE 1
Schematic representation of the proposed NIfTI‐MRS format. The format utilizes the native NIfTI header and data block, whereas using a JSON‐formatted NIfTI header extension to store additional required metadata. The NIfTI data block encodes spatial dimensions (dimensions 1–3), a time domain (dimension 4), and up to three further dimensions (total limited to seven by the NIfTI format definition). By default, the additional dimensions encode uncombined receive coil information (dimension 5), repeated measurements (dimension 6), and an “indirect” frequency dimension, that is, for 2D‐NMR (dimension 7). The purpose of these dimensions can be explicitly coded and changed by using the “dim_…” keys in the header extension. JSON, JavaScript object notation.
FIGURE 2
FIGURE 2
Extracts of NIfTI‐MRS JSON‐formatted header extensions for 4 different pieces of example data. The full example data is available from Ref.. Each example demonstrates a different aspect of the header extension format. Figure annotations are shown as blue italicized text. (A) Structure of a header extension of 1H single‐voxel data before preprocessing. (B) Header extension for processed 31P MRSI, including fields that are marked for anonymization (red). (C) Example of dynamic header fields indicating an editing condition stored in the seventh dimension. (D) Extract of the processing provenance in a MEGA‐PRESS sequence preprocessed using FSL‐MRS . 1H, hydrogen‐1; 31P, phosphorus‐31; FSL, FMRIB Software Library; MEGA‐PRESS, Mescher‐Garwood point resolved spectroscopy.
FIGURE 3
FIGURE 3
Proposed MRS and MRSI processing pipelines using NIfTI‐MRS and incorporating conversion in spec2nii. In the proposed pipeline, raw data from a variety of formats (e.g., DICOM, Siemens “Twix.dat”, GE “p‐file,” or Philips “SDAT/SPAR”) are converted to NIfTI‐MRS using spec2nii. Subsequently preprocessing can be applied, with both the input and results stored in NIfTI‐MRS. Data can be shared with other users or a data repository in a format‐agnostic way at any stage of the preprocessing pipeline. The preprocessed NIfTI‐MRS file can then be passed on to modeling software. Spec2nii can convert unlocalized, single‐voxel, and spatially reconstructed MRSI. In the future, spec2nii will also convert MRSI stored in k‐space for certain common supported sequences. For other sequences (e.g., those with non‐Cartesian trajectories), a pipeline incorporating the ISMRMRD format and third‐party reconstruction is proposed. The red box indicates software yet to be implemented. DICOM, Digital Imaging and Communications in Medicine.
FIGURE 4
FIGURE 4
NIfTI‐MRS single voxel spectroscopy data processed in 3 spectroscopy toolboxes supporting input and output of NIfTI‐MRS data. (A) Raw data converted to NIfTI‐MRS format by spec2nii was loaded and preprocessed in each of the toolboxes before being written back out to NIfTI‐MRS. Comparison of water‐suppressed (B) and water‐reference (C) data processed in each toolbox is simple using the pipeline in (A). The output NIfTI‐MRS data is easy to present alongside structural data stored in NIfTI format using a variety of MRS analysis software (D)
FIGURE 5
FIGURE 5
(A) MRSI data displayed in FSLeyes using the NIfTI‐MRS plugin. In addition to the NIfTI‐MRS data, results from spectral fitting (also stored in NIfTI format) are displayed overlaid on the spectrum, to the left a metabolite map of total choline is displayed overlaid on a T1w structural image. The spectrum display automatically displays voxel‐wise spectrum and fits as the cursor is moved over the orthographic display. (B) Partially preprocessed single voxel data displayed in FSLeyes alongside corresponding structural data. Beneath the main spectral view panel, an additional panel “NIfTI‐MRS” (bottom‐right) displays a summary of the MRS specific header information contained in the file, and a slider UI element to allow the user to view each spectrum stored in the higher (5th–7th) dimensions. Here the tenth (of 64) temporal averages stored in dimension 5 is displayed

References

    1. Bednařík P, Tkáč I, Giove F, et al. Neurochemical and BOLD responses during neuronal activation measured in the human visual cortex at 7 Tesla. J Cereb Blood Flow Metab. 2015;35:601‐610. - PMC - PubMed
    1. Palombo M, Shemesh N, Ronen I, Valette J. Insights into brain microstructure from in vivo DW‐MRS. Neuroimage. 2018;182:97‐116. - PubMed
    1. Spencer RG, Balschi JA, Leigh JS, Ingwall JS. ATP synthesis and degradation rates in the perfused rat heart. 31P‐nuclear magnetic resonance double saturation transfer measurements. Biophys J. 1988;54:921‐929. - PMC - PubMed
    1. Near J, Harris AD, Juchem C, et al. Preprocessing, analysis and quantification in single‐voxel magnetic resonance spectroscopy: experts' consensus recommendations. NMR Biomed. 2021;34:e4257. - PMC - PubMed
    1. C.8.14 MR Spectroscopy Modules. Available at: http://dicom.nema.org/medical/dicom/2017c/output/chtml/part03/sect_C.8.1.... Accessed December 16, 2020.

Publication types