Creating Mask for svs_segment in FSL-MRS

Hi,

I recently started using FSL-MRS for analyzing MEGA-PRESS data. I was able to fit the spectra successfully, but noticed that the quantification output was missing individual tissue volumes. Additionally, the tissue-water density values were the same across all subjects: GM = 0.78, WM = 0.65, and CSF = 0.97 (g/cm³).

After discussing this with my team, we agreed that it’s essential to use accurate, subject-specific tissue volume information. I’m now trying to use svs_segment to extract these values.

For inputs:

  • T1w: I’m using either norm.nii from the FreeSurfer pipeline or T1_biascorr.nii from the FSL fsl_anat pipeline.
  • Mask: This is where I’m encountering an issue.

Based on my acquisition protocol, it doesn’t seem like an explicit mask was provided. The sequence looks like this:

  • 01-localizer_32Channel
  • 02-acq-MPRage_T1W (my anatomical reference)
  • 03-recon_ax
  • 04-recon_cor
  • 05-eja_svs_mpress_lw
  • 06-eja_svs_mpress_lw
  • 07-VOI_precuneus
  • 08-eja_svs_mpress_On (MRS data – transients)
  • 09-eja_svs_mpress_On_RES (individual pulses?)

In the 07-VOI_precuneus folder, I have three DICOM files which, when converted to NIfTI, generate multiple files. When viewed in FSLeyes (see below), three of them — i00001_ROI1, i00002_ROI1, and i00003_ROI1 — clearly show box-like regions, presumably corresponding to the VOI. The rest seem to be duplicates or represent the slice on which the box was positioned.

I’ve been trying to combine these three ROIs and register them to the anatomical image so I can use the result as the mask input to svs_segment, but I keep running into errors.

Am I on the right track? And would you be able to guide me on how to properly create a usable mask from these files?

Thank you very much in advance!

Best regards,
Arsenii




Update:
I was able to overlay my three files — each containing a 2D box — onto the T1_biascorr image from the fsl_anat output. However, I’m still having trouble combining them into a single mask that can be used as input for svs_segment

Hi @Arsenic,

I’ve just got back from a short holiday. I’m not sure where you’ve got the impress you need to supply a mask to svs_segment (do let me know if that’s written somewhere), what you need to supply to the tool is:

  1. The T1 structural (or fsl_anat output)
  2. The NIfTI-MRS formatted spectral data.

Number two is then used to create a mask which is applied to the outputs of fsl_anat to generate the tissue fractions.

You can generate 2 by running e.g. spec2nii dicom -o output/location path/to/eja_svs_mpress_On_RES

Hi,

Thank you so much — I tried it, and it seems to be working!

However, I’m getting the following warning message :
/opt/anaconda3/lib/python3.12/site-packages/fsl_mrs/scripts/svs_segment.py:113: UserWarning: The mask does not fully intersect with the brain mask. Check manually.
warnings.warn(‘The mask does not fully intersect’)
CSF: 0.34, GM: 0.43, WM: 0.23.

Can I ignore this warning? Since i verified my mask (see pictures above)