Handling of white matter lesions in fMRIPrep

Summary of what happened:

I am using fMRIPrep to preprocess resting-state data for an older-adult sample, some of whom have extensive age-related white matter lesions.

My understanding is that fMRIPrep uses FSL FAST to segment tissue types and create tissue probability maps, and these tissue masks are used to extract some of the confound timeseries (e.g. global_signal, csf, white_matter, a_comp_cor, etc).

My problem is that FSL FAST misidentifies white matter lesions as gray matter, such that these lesions are included in the sub-*_label-GM_probseg.nii.gz files (see screenshots). The tissue-relevant confound timeseries are therefore being extracted from inaccurate tissue masks.

My questions:

  1. Are there any existing functions/options in fMRIPrep that would enable me to address this issue? I would imagine any sizeable sample of older adults would run into this problem.

  2. If answer to #1 is “no”, would the best course of action be to manually correct tissue masks by creating white matter lesion masks (using LST-AI or similar), subtracting them from the label-GM_probseg.nii.gz files (and maybe adding them into the label-WM_probseg.nii.gz files), and then re-create the confound timeseries on my own using the corrected masks?

  3. Another option would be to use lesion filling/painting methods developed for imaging of multiple sclerosis patients, and supplying the lesion-filled T1s as input to fMRIPrep (although I know fMRIPrep requires/prefers to have the “raw” T1 as input), to increase the probability of these lesions being accurately segmented. A reasonable option, or are there downstream consequences I’ve missed?

  4. Beyond the confound timeseries, are there additional consequences of the white matter lesion misclassification to consider? I’m trying to think through if it would have any impact on normalization, etc, and I don’t think it would.

Thanks in advance for any insight. I’m hoping someone with more experience/imagination than myself has already thought through this problem.

(Not sure if this belongs in Software Support or not, as it pertains to fMRIPrep software but is not a bug per se. Please let me know if it would be better placed in another category and I can create a new Topic as needed. Also, I did not include logs or validator output as they do not seem to be relevant to the question, but can post if needed.)

Command used (and if a helper script was used, a link to the helper script or the command generated):

#!/bin/bash

ml singularity

subj="$1"
singularity run -e --bind [data_path]:/data \
--bind [output_path]:/out \
--bind [license_path]:/license \
[fmriprep.sif path] \
/data /out participant \
--participant_label ${subj} \
--output-spaces fsnative fsaverage anat:res-native MNI152NLin6Asym:res-2 --fd-spike-threshold 0.5 --dvars-spike-threshold 3 \
--fs-license-file /license/license.txt -w [scratch_path]

Version: 24.1.0

Environment (Docker, Singularity / Apptainer, custom installation): Singularity via HPC

Screenshots / relevant information:

WM_lesion_GM_mask
sub-00046_dseg_x16


Hello,

In case any other researchers are running into this issue (now or in the future), I am following up with our attempt at a fix, and the further issues we are running into.

Using fMRIPrep v25.0.0, we are trying to use grey matter, white matter, and CSF tissue probability maps computed by CAT12 as precomputed derivatives. CAT12 (more or less) labels white matter lesions as white matter rather than grey matter, which addresses our concern above.

I have confirmed that the resolution and dimensions of the CAT12-derived probseg files match the resolution and dimensions of the FSL FAST-derived probseg files – the only difference is the data_type. CAT12 files are in ‘UINT8’ (datatype = 2) and FSL FAST files are ‘FLOAT32’ (datatype = 16).

The maps are stored in:

/sourcedata
    /tissueprobmaps
        /sub-X
            /anat
                /sub-X_label-CSF_probseg.nii.gz
                /sub-X_label-GM_probseg.nii.gz
                /sub-X_label-WM_probseg.nii.gz

and then the fMRIPrep call includes:

–derivatives /sourcedata/tissueprobmaps

The good news: fMRIPrep does seem to be handling the precomputed inputs, to an extent. While the precomputed native-space tissue probseg files are not copied into the sub-X/anat directory, the normalized (MNI152NLin6Asym) tissue probseg files are present and white matter lesions are included in the white matter map, as in the provided inputs.

The bad news:

  • The output normalized tissue probseg files are misnamed. sub-X_space-MNI152NLin6Asym_res-2_label-WM_probseg.nii.gz contains the grey matter probability map, label-GM contains the CSF map, and label-CSF contains the WM map. I have checked, double-checked, and triple-checked to make sure that the input files in the precomputed derivatives directory are named correctly, and am truly puzzled.

  • The dseg file, and the associated “Brain mask and brain tissue segmentation of the T1w” image in the HTML report, still incorrectly label white matter lesions as grey matter. I’m trying to wrap my head around why this is the case, and what the implications of it are for downstream processing. Because a dseg file was not provided in the precomputed derivatives, was FSL FAST run and used to create the dseg file, rather than creating it from the provided precomputed inputs?

I know the fMRIPrep devs have put a lot of work into integrating the precomputed derivatives into the latest versions and would be grateful for any insight they can provide. Ultimately, I just want fMRIPrep to do its processing using tissue probability maps where white matter lesions are labeled as white matter rather than grey matter, and am open to other approaches than what I’ve described. Thanks!