fMRIPrep with gadolinium enhanced T1w images

Hello,

I have a clinical imaging dataset that I am trying to run through the fMRIprep workflow but the process is not completing. The input data contains 3 subjects.

In the clinical imaging workflow, gadolinium is delivered prior to the MRI scan session to save time. This means the T1w sequences are gadolinium-enhanced. It seems the extra contrast in the T1w sequences is causing fMRIprep to hang.

I am running fMRIprep v1.5.4 as a singularity container on a remote HPC with the following parameters:

--nthreads 8 --n_cpus 8 --mem_mb 32000 -anat-only

I have tried adjusting the job resources but it still hangs after 72hrs. It appears to be stuck on recon-all.

I’m wondering what else I could try? Has anyone tried fMRIprep on gadolinium-enhanced T1w images?

Thanks!
Greydon

I preprocessed similar images last week. For me, 23.2.0 finishes successfully although I specifically skipped the recon-all step since I do not need it.

It seems that creating a brain mask for these images is more difficult than regular t1w images as I had te rerun 1 out of 7 subjects that had a lot of non-brain tissue inside the mask, which made normalization fail completely. For the others, the dura is regularly included inside the mask.

I could imagine that freesurfer has issues with these things. But I haven’t explicitly tested that.

If the images look something like the ones here in Figure 1, then I would run a separate bias correction or unifizing step (in AFNI, that’s 3dUnifize or 3dLocalUnifize).

I have had great success using synthstrip to brain extract data regardless of modalitiy, including Gd enhanced T1 scans. I would suggest using synthstrip one your images, and subsequently running fmriprep with the --skull-strip-t1w skip argument.

Oh sweet, thanks. I’ll go try out the suggestions :slight_smile:

For anyone running into the same issue:

I implemented the synthstrip solution and it seems to work well for our gadolinium T1w scans.

My python pipeline first applies synthstrip:

cmd = f"synthstrip-docker -i {anat} -o {stripped_anat} --no-csf"

I added the skullstripped file in the BIDS folder with the naming *_ce-gadolinium_rec-skullstrip_T1w.nii.gz.

and then I run fmriprep like so:

cmd = f"docker run -it --rm \
        -v {bids_folder}:/data:ro \
        -v {fmriprep_folder}:/out/ \
        -v {freesurfer_license}:/opt/freesurfer/license.txt \
        -v {fmriprep_bids_filter}:/etc/bids_filter.json \
        nipreps/fmriprep:23.2.0 \
            /data /out/out/ participant \
            --participant-label {subject} \
            --fs-no-reconall \
            --nprocs {cpu_count} \
            --anat-only \
            --fs-license-file /opt/freesurfer/license.txt \
            --skull-strip-t1w skip \
            --bids-filter-file /etc/bids_filter.json"

The filter file contains:

{
    "t1w": {
        "datatype": "anat",
        "reconstruction": "skullstrip"
    }
}

More info about fmriprep BIDS filtering is here.

1 Like