Tissue map contours overlay are misaligned

Dear community,

Using fmriprep (v.1.1.2 & v.1.1.3.) I get these strange misalignments between tissue contours and the actual anatomical scan in the visual reports on “Brain mask and brain tissue segmentation of the T1w” and “Susceptibility distortion correction” steps. Also, I see that the brainmasks is actually misdefined as part of my EPI-scans are cut off in preprocessing (so it is not just an error in the visual report, but seems to actually affect preprocessing. Ive done fmriprep in the following configurations.
-fmriprep 1.1.2 and fmriprep 1.1.3
-with and without running freesurfer (either by flagging freesurfer on and off, or using previously run freesurfer files on the same anatomical scans but in a different study).

all of these configurations give the same error. Any idea what seems to be going wrong here?

My next step is to run in fmriprep 1.3.1, but no idea if this problem is familiar.

Thanks,

Ruud

1 Like

Hi @RuudBerkers, thanks for posting this!

What this looks like to me is that the skull-stripping has gone poorly, at a guess due to low contrast in your T1w image. If you have your working directory, you can look for

fmriprep_wf/single_subject_01_wf/anat_preproc_wf/skullstrip_ants_wf/t1_skull_strip/highres001_BrainExtractionBrain.nii.gz

If that appears overly-cropped, then it was the initial skull stripping that went poorly. This may be a thing that can be overcome with a better template. I don’t believe the ANTs developers are very active on NeuroStars, so you may want to go to their mailing list to see if they have recommendations. If you find a solution that works for you (e.g., an alternative template or modified parameters), then we can see about incorporating that into fMRIPrep.

Another option is to find some skull-stripping algorithm that works for you, and we can add to fMRIPrep the ability to accept brainmasks as an input, rather than calculating our own. This would be related (but not identical to) to an open issue to handle T1w images that are already skull-stripped.

Let me know what you think, and we can figure out how to proceed.

Best,
Chris

@effigies, don’t you think that the segmentation contours are displaced too? If it were just a bad brain mask then I would expect those contours to be aligned.

I think there is some kind of offset introduced by some xform header and the mask we see is, in reality, the intersection of the antsBrainExtraction one and FreeSurfer.

Could you provide us with one example dataset, @RuudBerkers?

1 Like

You’re right, I didn’t take a close-enough look. Good catch.

1 Like

@oesteban Indeed, the segmentation contours are displaced too. I’ve know rerun fmriprep using version 1.3.1, and the problem persists, see attachment.

@oesteban

As a consequence of the brain mask, I think, the recon-all output seems to cut off tissue in the back of the brain:

.

And the EPI - to - T1 registration seems also off.

(PS: sorry for multiple postings, I am apparently only allowed one attachment per post)

Now here is the strange part:

We’ve run fmriprep on the exact same participants, and the exact same anatomical scan, but for different task scans - with none of these problems occurring.

Ive kept the two task scans in completely independent BIDS-directories. And tried running it both completely from scratch, as well as copying the Freesurfer results from the analysis of the same anatomical scans in the other dataset to the current dataset (and then fmriprep skips the freesurfer analysis and simply uses the existing directory). In all cases the errors occur, which I do not understand.

Also, since the misalignment seems to affect further preprocessing steps (?), it may not be just a displaying or Xform issue? I dont really know.

Re: sharing a dataset. What is the best way to share it? Id have to see if I am allowed to share it…

x-forms can definitely jeopardize further steps since fMRIPrep mixes from different toolboxes and they have different implementations of the NIfTI format.

Dropbox, Box, Filesharing website, S3, Google Drive, anything works out. You can use private links for all of them.

You can also upload to OpenNeuro and share it with us specifically.

BTW, just one T1w image would suffice.

A post was split to a new topic: fMRIPrep: overzealous T1w mask