nipreps / fmriprep

fMRIPrep is a robust and easy-to-use pipeline for preprocessing of diverse fMRI data. The transparent workflow dispenses of manual intervention, thereby ensuring the reproducibility of the results.
https://fmriprep.org
Apache License 2.0
630 stars 292 forks source link

fmap SDC result incorrect: comparison with earlier fmriprep version #2056

Closed sangillee closed 4 years ago

sangillee commented 4 years ago

Hi

I recently re-ran my preprocessing analysis and I found that the fmap SDC result is very wrong in the newer version of fmriprep. When I looked across several participants, I think this issue is only happening with subjects whose fieldmap didn't contain the entire brain. Maybe an interpolation issue around the edges?

I have a setup with two magnitude images and one phase difference image. The old fmriprep was version 1.2.5 The new fmriprep is version 20.0.5 I am attaching the images from the summary reports from both old and new fmriprep along with the relevant report stubs: https://www.dropbox.com/sh/ltxj7grwfrsik4t/AACJxb2Fq4kMuJ96qBpdmrjTa?dl=0

oesteban commented 4 years ago

I think this issue is only happening with subjects whose fieldmap didn't contain the entire brain. Maybe an interpolation issue around the edges?

After looking at your visual reports, I can only think that fMRIPrep has gotten much better. Previously, you can see how the signal outside the FoV of the fieldmap is just masked out. Although I would not use fieldmap correction under those conditions (i.e. the FoV not covering the full f/dMRI dataset), I think it is much better to try to apply the fieldmap only where you have data (fMRIPrep 20.x), instead of masking out those uncovered regions (fmriprep <20).

That said, in your particular use-case I think you'd get more "natural" results at the edges of the FoV if we finally managed to implement the bspline smoothing / extrapolation (nipreps/sdcflows#14). [however, using those incomplete fieldmaps would still be dangerous]

sangillee commented 4 years ago

@oesteban I see. Thank you.

But I'm a little confused by what you mean 'apply the fieldmap only where you have data'. Isn't the older version doing basically that by masking out the uncovered regions and not applying the fieldmap data there? When I look at the older pre-processing outputs, the bold image is still intact for the whole brain even though the fieldmap FoV is cut. So doesn't this mean that the b0map is being applied only in the masked regions? Sorry for the confusion...

oesteban commented 4 years ago

What I mean is that, very often we prescribe a very narrow FoV for the fieldmaps, not covering the brain in full, or extremely tightly. When there is a substantial difference in the tilt of the FoV/head w.r.t. the axial axis, then the edges of the fieldmap will be oblique to the image you want to correct. Because of this, undesired edge effects will show up where the FoV is too narrow (typically, the cerebellum and because of the inclination, those effects might accumulate around the ventromedial PFC or the visual cortex at the other end).