nipreps / sdcflows

Susceptibility Distortion Correction (SDC) workflows for EPI MR schemes
https://www.nipreps.org/sdcflows
Apache License 2.0
32 stars 26 forks source link

Draft MEDIC dynamic distortion correction method #435

Closed tsalo closed 6 months ago

tsalo commented 7 months ago

Closes #36.

This currently runs on some test data, but I haven't evaluated the results.

Changes proposed:

Still to do:

codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 19.83871% with 497 lines in your changes are missing coverage. Please review.

Project coverage is 66.28%. Comparing base (73d717a) to head (ed0f46c).

Files Patch % Lines
sdcflows/utils/misc.py 7.14% 234 Missing :warning:
sdcflows/interfaces/utils.py 24.51% 117 Missing :warning:
sdcflows/workflows/fit/medic.py 12.62% 90 Missing :warning:
sdcflows/interfaces/fmap.py 55.31% 42 Missing :warning:
sdcflows/utils/phasemanip.py 6.66% 14 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #435 +/- ## =========================================== - Coverage 76.43% 66.28% -10.16% =========================================== Files 32 33 +1 Lines 2835 3455 +620 Branches 376 416 +40 =========================================== + Hits 2167 2290 +123 - Misses 600 1097 +497 Partials 68 68 ``` | [Flag](https://app.codecov.io/gh/nipreps/sdcflows/pull/435/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nipreps) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/nipreps/sdcflows/pull/435/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nipreps) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nipreps#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tsalo commented 7 months ago

I still need to figure out why the results don't look good, but I was thinking an alternative might be for me to simply integrate warpkit as a dependency and run that directly. Would that be preferable to a translated Nipype workflow?

mgxd commented 7 months ago

If using warpkit significantly improves performance, all the more reason to wrap it rather than reimplement - it'll come with the added benefit of reducing longterm maintenance 😄

One hurdle that would add is a more complex installation - however if/when https://github.com/vanandrew/warpkit/issues/6 is resolved it would be a cinch

tsalo commented 6 months ago

@mgxd I did what you proposed in #438, so I'll close this PR now.