To deal with or not to deal with lining up T1w lesion masks with EPIs

Relatively new fmri researcher here. We are conducting a dense-data study of 10 subjects featuring 5-session repetitions of a 2-condition T1w study that sometimes overlap with 5 different functional tasks that repeat anywhere from 1-10 times in separate session repetitions.

For our study, unfortunately about 25% of our scans were affected with by a missing anterior headcoil (problems with it being actively powered), which caused significant signal loss in the front half of the brain. We wanted to account for this by feeding in lesion-masks for the participants affected, lesioning out the front half of the brain only for the T1w and func/EPI images affected before fmriprepping. Ideally, we’d have a unique lesion mask for every session. Unfortunately:

  1. Fmriprep will not tolerate any more than a single lesion mask per participant (which is not what is implied here:

  2. Using the bids-filter-file flag also will not allow us to filter for a specific lesion mask despite specifying in the “roi” entities in the .json file. (fmriprep will simply find all of them for the subject and crash after passing in a list a la:

I was wondering if the following workaround is sufficiently well thought out:

  1. Run fmriprep with 1 lesion mask per subject into a /derivatives/lesioned directory: This will fmriprep all data, with T1w/EPI images with AND without anterior headcoils, registering them to a single lesioned T1w image.

  2. Run fmriprep without any lesion masks into a /derivatives/no-lesion directory: This will fmriprep all data, with T1w/EPI images with AND without anterior headcoils, as normal.

  • The potential issue I see with this is the way I think fmriprep works is that it’ll average all the T1w images together and then register the EPI images to those T1s.
  1. Is that a problem if some of the T1s are not good?
  2. Would it be better if I only fmriprep T1s and EPIs I know are good?

Do you have a good T1w image for each subject? How much modulation do you expect?

I do not fully understand your proposal at the end, so I can’t really evaluate it. I would probably attempt the following:

  1. Remove all T1w images with headcoil issues.
  2. Run sMRIPrep to get your per-subject templates. You may now use ANTs or mri_robust_register to register your degraded T1w images to these templates.
  3. Pre-align your BOLD files to the per-subject templates, ideally only modifying the affine transform.
  4. Run fMRIPrep with --bold2t1w-init header to attempt to improve the alignment without the risk of a gross misalignment in the first stage.

Each of the BOLD files is processed separately by fMRIPrep, so you can inspect the results manually at the end.

Thank you for the reply. I will get to work to implementing your suggestion. While I was waiting for a reply, I had run fmriprep with a single lesion mask for all the EPI images without anterior headcoils detected for one subject. What was in the fmriprep html output surprised me quite a bit, I was wondering if anyone can help me out with them.

First of all, the resulting brains don’t looked lesioned at all. In fact, going through the log file, I don’t see any acknowledgement of the T1w_anterior-lesion_roi.nii.gz file at all, despite its presence in the first anat directory of the first session.

Second of all, brain extraction looks to have performed terribly, extracting eyes as well.