Handling of white matter lesions in fMRIPrep

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!