Manipulating MRS Data

Handling NIfTI-MRS

MRS data stored in NIfTI-MRS format can contain multiple higher dimensions. For example it might contain dimensions encoding multiple receive coils, multiple temporal averages, or even a spectral editing dimension.

Data might need to be manipulated within the NIfTI-MRS storage framework before, after, or during preprocessing. For this, FLS-MRS provides the mrs_tools command line script. mrs_tools has the ability to merge and split NIfTI-MRS files along the higher encoding dimensions. It can also reorder the higher dimensions, or create a new singleton dimension for further manipulation.

mrs_tools also contains the mrs_tools vis and mrs_tools info options to provide quick visualisation and information on the command line. See the Visualisation page for more information on mrs_tools vis/info.

mrs_tools split takes a single file and splits it along a specified dimension e.g. --dim DIM_DYN, at a single point (--index 8) or extracting multiple elements into a second file (--indices 8 9 10).

mrs_tools merge takes two or more files and merges them along a specified dimension e.g. --dim DIM_EDIT.

mrs_tools reorder permutes the dimensions of an existing NIfTI-MRS file. For example, the 5th through 7th dimensions can be changed from DIM_COIL, DIM_DYN, DIM_EDIT to DIM_DYN, DIM_EDIT, DIM_COIL using --dim_order DIM_DYN DIM_EDIT DIM_COIL.