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: Reorient fieldmaps to RAS before estimating B-splines #354

Merged
merged 2 commits into from
Apr 24, 2023

Conversation

effigies
Copy link
Member

In #339, we ensured that the b-spline coefficients were interpreted in RAS when applied, but failed to ensure that they were calculated in RAS when deriving from pre-existing fieldmaps.

I still need to carefully walk through a workflow directory created fresh with this patch to verify that everything is as it should be.

Fixes #353.

@effigies effigies changed the base branch from master to maint/2.4.x April 20, 2023 15:48
@effigies
Copy link
Member Author

Okay. I had to be a bit more thorough to ensure that the debug maps were generated properly, but this looks good now. With this, the outputs of bs_filter are always in RAS. So I think we have:

  1. PEPolar: Orig -> ReorientToLAS -> LAS -> TOPUP -> LAS (affine says RAS) -> TOPUPCoeffReorient -> RAS
  2. phasediff/phase1+2: Orig -> Phasediff2Fieldmap -> Orig -> BSplineApprox -> RAS
  3. Fieldmap: Orig -> CheckB0Units -> Orig -> BSplineApprox -> RAS
  4. SyN: Orig -> SyN -> LPS (affine says RAS) -> DisplacementsField2Fieldmap -> RAS -> BSplineApprox -> RAS

@effigies
Copy link
Member Author

effigies commented Apr 21, 2023

@oesteban Do you have any time to review? I consider this a bug fix and have tested locally and I'm okay merging if tests are green.

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 20.00% and project coverage change: -0.26 ⚠️

Comparison is base (5ef62fc) 83.25% compared to head (03b9e8a) 83.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@               Coverage Diff               @@
##           maint/2.4.x     #354      +/-   ##
===============================================
- Coverage        83.25%   83.00%   -0.26%     
===============================================
  Files               25       25              
  Lines             2096     2106      +10     
  Branches           249      251       +2     
===============================================
+ Hits              1745     1748       +3     
- Misses             307      313       +6     
- Partials            44       45       +1     
Impacted Files Coverage Δ
sdcflows/interfaces/bspline.py 75.19% <20.00%> (-1.86%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@effigies effigies merged commit b2493fa into nipreps:maint/2.4.x Apr 24, 2023
@effigies effigies deleted the fix/reorient-fmap branch April 24, 2023 13:06
@effigies effigies added this to the 2.4.3 milestone May 8, 2023
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.

Distortion correction translating instead of unwarping
2 participants