Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Mask B0 field estimate during application #395

Closed
wants to merge 5 commits into from

Conversation

effigies
Copy link
Member

This addresses issues like nipreps/fmriprep#3013. For phasediff images, the field estimate outside the mask is not used to generate the B-spline representation, which means that the error outside the mask can be arbitrarily large. This results in pulling EPI signal to regions well outside the brain and smearing signal on the edge of the brain.

This PR allows the estimation mask to be passed to correction.

This requires an additional PR in fMRIPrep to be connected up properly. It's possible that the connection will need to be conditional on fieldmap type, as not all types use the mask for fitting the splines.

Big thanks to @feilong for helping point me in the right direction here.

Builds on #393.

Before

image

After

image

@effigies
Copy link
Member Author

Here's an alternative, where instead of masking during application, we mask the fieldmap before fitting the spline estimate:

image

This seems to produce less of a discontinuity, although it doesn't fix similar problems for PEPOLAR scans.

@effigies
Copy link
Member Author

After discussion with @oesteban, we've settled on the approach in #396 instead.

@effigies effigies closed this Sep 27, 2023
@effigies effigies deleted the fix/mask-fields branch September 27, 2023 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants