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

ENH: Base implementation for phase1/2 fieldmaps #60

Merged
merged 3 commits into from
Nov 25, 2019

Conversation

oesteban
Copy link
Member

@oesteban oesteban commented Nov 25, 2019

Putting together the lessons learned in #30, leveraging #52 and #53 (unfolded from #30 too), and utilizing #50 and #51, this workflow adds the phase difference map calculation, considering it one use-case of the general phase-difference fieldmap workflow.

On top of this PR, we can continue the discussions held in #30. Probably, we will want to address #23 the first - the magnitude segmentation is sometimes really bad (e.g. see the phase1/2 unit test).

Another discussion arisen in #30 is the spatial smoothing of the fieldmap (#22).

Finally, the plan is to revise this implementation and determine whether the subtraction should happen before or after PRELUDE, and whether the arctan2 route is more interesting (#59).

@pep8speaks
Copy link

pep8speaks commented Nov 25, 2019

Hello @oesteban, Thank you for updating!

Cheers! There are no style issues detected in this Pull Request. 🍻 To test for issues locally, pip install flake8 and then run flake8 sdcflows.

Comment last updated at 2019-11-25 18:15:45 UTC

@oesteban
Copy link
Member Author

Please have a look @Aksoo 👍

Fixing the ``acq`` -> ``acquisition`` query made the HCP test case
break.
@oesteban oesteban force-pushed the enh/extend-2-phases branch from f13eeef to ea0cf68 Compare November 25, 2019 05:48
@oesteban
Copy link
Member Author

I think the main differences between the phasediff and the phase1/2 now are derived from the quite different mask of the magnitude image:

Any voices against merging this @Aksoo, @mattcieslak ?

@mattcieslak
Copy link
Collaborator

Do you have the actual fieldmaps that we can look at? I'm only seeing the figures on circleci

@oesteban
Copy link
Member Author

Okay, we should now have access to the corresponding NIfTI files resulting from the tests on CircleCI: https://app.circleci.com/jobs/github/oesteban/sdcflows/303/artifacts

They will be available as soon as the tests finish. I will give you a heads-up since I'm very interested in getting this merged ASAP (we are holding a release of fMRIPrep for this and some other changes).

@oesteban
Copy link
Member Author

@oesteban
Copy link
Member Author

Lats call before I merge - otherwise, I'm happy to follow up conversation on #22, #23 and #59.

@mattcieslak
Copy link
Collaborator

These look very good. The actual values line up closely in the phasediff and subtracted phases

Copy link
Collaborator

@mattcieslak mattcieslak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This follows the FUGUE guide, with unwrapping the phase images, then subtracting them.

@oesteban
Copy link
Member Author

Thanks for the review! Very happy to improve this base implementation with your ideas and @Aksoo's. Let's roll this out and build from there.

@oesteban oesteban merged commit 18d2aec into nipreps:master Nov 25, 2019
@oesteban oesteban deleted the enh/extend-2-phases branch November 25, 2019 21:35
@kimsin98
Copy link
Contributor

Late response (punted and forgot about this when GitHub broke yesterday) but everything looks good as far as following the old protocol. The refactors greatly improved code organization as well.

I will follow up with my suggestion in #59.

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.

4 participants