Skip to content

ENH: Couple head motion and susceptibility distortion within TOPUP#548

Open
mgxd wants to merge 8 commits into
mainfrom
enh/topup-estmov
Open

ENH: Couple head motion and susceptibility distortion within TOPUP#548
mgxd wants to merge 8 commits into
mainfrom
enh/topup-estmov

Conversation

@mgxd

@mgxd mgxd commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Reworks init_topup_wf to have topup handle both head motion and SD estimation concurrently.

A new interface SelectPEVolumes has been added to reduce excessive number of inputs (like in #279), based on recommendations from the topup docs. ATM, this is set to 3 pairs, but can be further reduced if needed.

Additionally, the padding hack needed to process images with an uneven # of slices was removed (again, recommended by their docs) - instead their stock configs are now present and are auto-selected based on the shape of the incoming field maps. Config file used should not have a drastic effect on the field, just the processing speed.

Given that RobustAverage was removed, mc_method is no longer needed and was removed from init_topup_wf. Hadn't seen a release yet so better to remove than deprecate.

mgxd added 6 commits June 25, 2026 11:51
Since #279, motion estimation
was decoupled and performed independently of topup. This re-enables it,
with some modifications listed in the topup docs:
https://fsl.fmrib.ox.ac.uk/fsl/docs/diffusion/topup/index.html

An overview of the changes:
- removal of slice padding - now the topup config file is selected based on
the input data shape, with an emphasis on speed (divisable by 4, 2, and finally 1)
https://fsl.fmrib.ox.ac.uk/fsl/docs/diffusion/topup/FAQ/index.html#do-i-have-to-have-an-even-number-of-slices-to-use-topup
- volumes are capped per PE - instead of averaging across all, select a max of 3 per PE direction
https://fsl.fmrib.ox.ac.uk/fsl/docs/diffusion/topup/users_guide/index.html#what-data-to-acquire-in-order-to-use-topup
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.42424% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.13%. Comparing base (8578e49) to head (d11bbc7).

Files with missing lines Patch % Lines
sdcflows/interfaces/utils.py 50.00% 2 Missing and 1 partial ⚠️
sdcflows/workflows/fit/pepolar.py 92.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #548      +/-   ##
==========================================
+ Coverage   84.09%   84.13%   +0.03%     
==========================================
  Files          30       30              
  Lines        2880     2937      +57     
  Branches      383      390       +7     
==========================================
+ Hits         2422     2471      +49     
- Misses        382      388       +6     
- Partials       76       78       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mgxd mgxd force-pushed the enh/topup-estmov branch from 5f77c31 to 09d51d2 Compare June 25, 2026 17:07
@mgxd mgxd marked this pull request as ready for review June 26, 2026 18:49
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.

1 participant