fMRIprep BOLD brain mask issue

Hello,

We are running into an issue where the functional brain mask looks like it is missing parts of the medial and lateral temporal lobes. There is signal dropout in these areas although there is presumably some small signal there we would like to keep included. This is an issue in all of our preprocessed subjects (n=10).

Is there anyway to modify the fMRIprep command so that the brain mask is not cut off?

Thank you,
Catherine

Files

Here is an image of the functional brain mask generated from fMRIprep overlaid on the prepreprocessed BOLD data for one subject.

Here is an image of the functional brain mask generated from fMRIprep overlaid on the MNI brain for one subject.

fMRIprep command (version 21.0.1)

SINGULARITY_CMD=“singularity run --cleanenv
–bind ${MAIN_DIR}:/home
–bind $BIDS_DIR:/data
–bind $SCRATCH_DIR:/work
$FMRIPREPIMAGE”

cmd="${SINGULARITY_CMD}
–participant-label $subject
–ignore fieldmaps slicetiming
–bids-filter-file /data/sen.json
–fs-license-file /data/derivatives/license.txt
–fs-subjects-dir /data/derivatives/T1
–fs-no-reconall
–bold2t1w-dof 6 --nthreads 8 --omp-nthreads 8
–work-dir /work
–write-graph --notrack -v
/data/nifti_test /data/derivatives/FMRI_Sentences participant"

Hi,

A few things:

  1. Do you have Freesurfer outputs you can use? I see you’ve added the –fs-no-reconall flag. With FreeSurfer outputs you can get some good boundary based registration to align BOLD and T1.
  2. Does the original or preprocessed BOLD signal look like there is signal dropout in those areas?
  3. Are you doing any susceptibility distortion correction? I see you are ignoring fieldmaps, so I would guess not. This could also help. If you do not have fieldmaps, you can try the fieldmap-less method (--use-syn).
  4. I believe version 21.0.2. improved BOLD masking workflows.

Best,
Steven

Hello Steven,

Thank you for your response.

  1. Do you have Freesurfer outputs you can use? I see you’ve added the –fs-no-reconall flag. With FreeSurfer outputs you can get some good boundary based registration to align BOLD and T1.
  • Yes we had previously run Freesurfer so I will move those data to our output folder.
  1. Does the original or preprocessed BOLD signal look like there is signal dropout in those areas?
  • Unfortunately yes, there is signal dropout in those areas in both the original and preprocessed data. We were hoping there was some way to preserve the signal there in the brain mask despite it being small.
  1. Are you doing any susceptibility distortion correction? I see you are ignoring fieldmaps, so I would guess not. This could also help. If you do not have fieldmaps, you can try the fieldmap-less method (--use-syn).
  • Yes, our data were PURE corrected on the scanner therefore those files have been passed as the “original” data to fMRIprep
    .
  1. I believe version 21.0.2. improved BOLD masking workflows.
  • I will upgrade our version

Hello Steven,

Thank you again for your guidance. I pointed fmriprep to our processed freesurfer data and did see a slight improvement in the brain mask around the MTL (red = freesurfer output included, blue = original). Unfortunately, we are still missing part of the MTL which is critical for our study. There is also some additional pia matter in the mask. I am waiting for the newest version of fmriprep to become available on the server I am working on, therefore I have not tried running fmriprep again using that.

In the meantime, is there a way to pass along a precomputed brain mask to fmriprep, similar to passing along a brain-extracted T1?

Screen Shot 2022-06-06 at 10.33.30 AM

Thank you,
Catherine

Dear experts,

I’m facing a similar issue with the functional brain masks in our current dataset. See an example below and the html report here: ZI Cloud
password: mz2WrvfZ4QGG

I’m running fmriprep version 21.0.2 via singularity with the following arguments

singularity run --cleanenv - B /tmp, /BIDS_DIR, /FMRIPREP_DIR,
participant --participant-label $subject
–fs-license-file license.txt
–mem-mb 16384 --n_cpus 8
–skip-bids-validation
–use-syn-sdc
–use-aroma
–work-dir /tmp
–stop-on-first-crash
–output-spaces T1w MNI152NLin6Asym MNI152NLin6Asym:res-2

As you can see I added the fieldmap-less option and freesurfer reconstruction, but the results weren’t better when running without it. Unfortunately, I have this issue in most subjects of that dataset.

I’m grateful for any input

Best,
Martin

Hi @LoefflerMartin

Fmriprep 22.1.0 (recently released) includes a new version of SDC flows which may help. Please try upgrading and if you still get poor results, open a new thread under the “software support” category, making sure to fill in the template that is provided.

Best,
Steven

Hi @Steven,

thanks for your quick response! I was waiting for our server admin to install 22.1.0 after his well deserved holiday. I ran tests on the original and one additional subject using the exact same code, but with the new version (22.1.0).

With the original subject I’m running in a node/resampling error. I’ve put the html report and the terminal output here: ZI Cloud
PW: oTkcskeyO6pQ

Another subject ran fine, but showed similar problems with the functional brain masks as before: ZI Cloud
PW: f1yeeM4OKB6V

I’m grateful for input!

Best,
Martin

Dear @Steven,
Do you have any suggestions? Or is there a way to pass on masks from other sources as @ctallman suggested?
Thanks for your advice!
Best,
Martin

Hi,
I am having a similar issue and I would like to ask if it was resolved? Specifically:

  1. Were you able to define another bold mask that considers the regions with signal dropout?
  2. If so, what flag or line of commands did you use for that?
  3. Did it require freesurfer, fieldmaps, or upgrading to a later fmriprep version than 21.0.1?

Thank you so much

Hi,

Why don’t you use the anatomical brain mask calculated from fmriprep resample to your functional resolution? That way you are sure that even the area not present in the original functional brain mask due to dropout will be included in the brain mask for your functional analysis.

Dear @jsein,

thanks a lot for your response! Could you elaborate a little on how you would do that practically? I believe, for “resampling” the anatomical and functional images would have to be aligned already, just not in the same space, right? Do you mean something like:

  1. registering the anatomical brain mask to the raw EPI space, using e.g. FLIRT
  2. apply brain masks to raw EPIs
  3. rerun fmriprep and skip skull stripping as you mentioned here: Using fmriprep with brain-extracted raw data - Neuro Questions - Neurostars?

I’m nor 100% sure what --skull-strip-t1w skip really does? Does it only skip T1 brain extraction or also change behavior on functional processing?

Many thanks for your opinion!

Best,
Martin

Hi @LoefflerMartin,

I was thinking at something simpler: fmriprep projects the T1w and the functional data in the same spaces (after correcting the functional data and aligning it to the T1w) but usually at different resolutions.

For example you could use different tools: (FSLeyes - resample, FLIRT (with -applyxfm), niftyreg/reg_resample, AFNI 3dresample, … ) to resample the image :
anat/sub-SUB_ses-SES_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
into
func/sub-SUB_ses-SES_task-TASK_run-RUN_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz resolution.

Hello @LiorAbramson - the above suggestion is what I ended up doing.

Warm regards,
Catherine

1 Like

Thank you Catherine and @jsein !
I would like to ask if another solution is also viable:
Does it also make sense to define a higher signal loss threshold in the level-1 design template, so that low values will not be masked out? And if so, does it make sense to do that even if I don’t do motion correction in fsl (because I already did that in fmriprep) and if I don’t have fieldmaps?

Thank you very much,
Lior

Hi @LiorAbramson ,

I think this approach is valid, it is what is called an “implicit” mask, while providing a pre-calculated mask is called an “explicit” mask. You will have to be careful to adjust the threshold to your needs.

Indeed, you should not do any other preprocessing (except smoothing which is not done in fmriprep) if you plan on using fmriprep derivatives, for which all the common preprocessing steps are already done on the data.

1 Like

thank you! unfortunately it seems that changing this threshold (in any direction) doesn’t change anything in the output, but I will continue to check this option.

What tool do you use, which uses this kind of threshold? Personally (but not an fmri analysis expert) I am more confortable with an explicit mask, which can be constructed and visualized up front.

EDIT: I saw your other post. Hopefully you will get useful suggestions there.

1 Like