Home

Awesome

The NIfTI-MRS data standard repository

This is a repository to store information and code associated with the efforts to define an in vivo magnetic resonance spectroscopy (MRS) NIfTI data format.

Documentation for the format is available online.

Why?

Users of MRS and magnetic resonance spectroscopic imaging (MRSI) are faced with numerous data formats. Often vendor-specific expertise is needed to interpret, reconstruct, and analyse MRS data. Other users rely on disparate software, with inconsistent implementations. Furthermore, there is no accepted format for sharing or storing spectral data. Researchers cannot easily interpret data processed in another laboratory, nor can data be made “open” in a consistent format.

Why NIfTI?

NIfTI has been chosen due to its simplicity, availability of supporting libraries, ubiquity in the neuroimaging community, and extensive pre-existing support. Moreover, the results of spectral fitting can trivially be stored as unmodified NIfTI images. As a result data, results, and associated imaging can all be held and viewed using a single format.

NIfTI-MRS

The provisional format specification can be found in this repository as a markdown file (specification.md) and at Zenodo

A discussion on the format is ongoing at the MRSHub forums. Note that this thread has been split off from a longer one on the proposed MRS BIDS format. We are also holding regular meetings, get in contact via the MRSHub discussion or email if you would like to get involved.

Conversion of data to NIfTI-MRS

Conversion of data can be carried out manually, but a separate project, spec2nii, can be used for automatic conversion of data to the format.

spec2nii supported formats

To see an up-to-date list of formats supported by spec2nii, see the spec2nii README.

The following table also summaries those formats supported.

FormatFile extensionSVSCSIAutomatic orientation
Siemens Twix.datYesNoYes
Siemens DICOM.ima / .dcmYesYesYes
Philips.SPAR/.SDATYesNoYes
Philips.data/.listYesNoYes
Philips DICOM.dcmYesNoYes (WIP)
GE.7 (pfile)YesYesYes
UIH DICOM.dcmYesYesYes
Bruker2dseqYesYesYes
BrukerfidYesYesYes (WIP)
VarianfidYesNoNo (WIP)
LCModel.RAWYesNoNo
jMRUI.txtYesNoNo
jMRUI.mruiYesNoNo
ASCII.txtYesNoNo

Visualisation of NIfTI-MRS

image MRSI data stored as NIfTI-MRS displayed in FSLeyes alongside metabolite maps and spectral fits.

The NIfTI-MRS format can be viewed using the free NIfTI visualiser FSLeyes. A plugin developed by the standard's authors extends FSLeyes to:

Analysis packages supporting NIfTI-MRS

This is a list of MRS analysis packages that are known to support NIfTI-MRS

Minimal examples of interpreting NIfTI-MRS in are contained in Java, Python, MATALB, and R are included in the minimal_examples folder.

This Repository

The repository currently holds:

All data is tracked using git LFS.

Requirements

To run the included python jupyter notebooks you will need:

We recommend using conda to download the packages, and using python >=3.7.

    conda install \
    -c conda-forge \
    -c defaults\
    -c https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/channel/ \
    jupyterlab pymapvbvd nibabel numpy h5py spec2nii fsl-mrs

Licence

The content of this project itself is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) Licence, any code within this repository is licensed under the BSD 3-Clause Licence.