Skip to content

FIX: Re-enable priors respecting sd_priors argument #488

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

Merged
merged 3 commits into from
Mar 26, 2025

Conversation

oesteban
Copy link
Member

@oesteban oesteban commented Mar 26, 2025

Re-enables the inclusion of a prior mask, but moving the logic into the preprocessing (which is more readable).

If sd_priors is set to False on the preprocessing, then the sd_prior output is populated with another brain mask (which is equivalent to the behavior after #480).

EDIT: Pun intended for @effigies. As you'll see, I've refrained from changing the argument name atlas_threshold, however, I fixed the node name because—to me—a displacements field is not an atlas :D

@oesteban oesteban requested review from mgxd and effigies March 26, 2025 16:19
@oesteban oesteban force-pushed the fix/correctly-handle-priors branch from 7e34769 to 6b55a28 Compare March 26, 2025 16:25
effigies
effigies previously approved these changes Mar 26, 2025
Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

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

This makes sense to me.

@mgxd Note that sd_prior is removed from the syn_sdc_wf. It never did anything, but you should stop passing it before we remove **kwargs (if we do). It does still do something on the syn_preprocessing_wf.

Copy link

codecov bot commented Mar 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.98%. Comparing base (986d7fd) to head (290d240).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #488      +/-   ##
==========================================
+ Coverage   83.86%   83.98%   +0.11%     
==========================================
  Files          30       30              
  Lines        2826     2828       +2     
  Branches      367      367              
==========================================
+ Hits         2370     2375       +5     
+ Misses        385      384       -1     
+ Partials       71       69       -2     

☔ View full report in Codecov by Sentry.
📢 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.

@oesteban
Copy link
Member Author

oesteban commented Mar 26, 2025

This makes sense to me.

and the atlas pun? 😅

EDIT: I see your emoji reaction now :D

mgxd
mgxd previously approved these changes Mar 26, 2025
Copy link
Contributor

@mgxd mgxd left a comment

Choose a reason for hiding this comment

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

Have not tested it, but feels cleaner removing the priors logic within init_syn_sdc_wf.

@oesteban oesteban dismissed stale reviews from mgxd and effigies via 84a755e March 26, 2025 16:51
@oesteban oesteban force-pushed the fix/correctly-handle-priors branch 2 times, most recently from 004ed5e to 1cc6a7e Compare March 26, 2025 17:00
@oesteban oesteban force-pushed the fix/correctly-handle-priors branch from 0b43ccc to 67ea545 Compare March 26, 2025 17:07
@effigies effigies merged commit a8fb727 into master Mar 26, 2025
18 checks passed
@effigies effigies deleted the fix/correctly-handle-priors branch March 26, 2025 17:58
effigies added a commit that referenced this pull request May 15, 2025
2.13.0 (May 15, 2025)

Feature release in the 2.13.x series.

This release addresses some longstanding issues with the SyN-SDC workflow,
improving the registration quality in adult humans by utilizing a spatial prior,
as well as allowing Laplacians to be up- or down-weighted in the cost function,
making it more usable across species.

Additionally, this release allows for the use of ``EstimatedTotalReadoutTime`` or
``EstimatedEchoSpacing``, or a manually provided fallback ``TotalReadoutTime`` value,
permitting the use of SDCFlows on datasets that do not have reliable timing information
without introducing incorrect metadata into the datasets.

* fix(syn): Re-enable priors respecting ``sd_priors`` argument (#488)
* feat: Add workflow arguments for metadata estimates and fallback TRT (#479)
* feat(syn): Update totalFieldVarianceInVoxel space based on voxel resolution (#487)
* feat(syn): Allow changing laplacians weights in SyN registration metric (#484)
* test(syn): Add a test to exercise SyN workflow creation and check parameters (#486)
effigies added a commit that referenced this pull request May 15, 2025
2.13.0 (May 15, 2025)

Feature release in the 2.13.x series.

This release addresses some longstanding issues with the SyN-SDC workflow,
improving the registration quality in adult humans by utilizing a spatial prior,
as well as allowing Laplacians to be up- or down-weighted in the cost function,
making it more usable across species.

Additionally, this release allows for the use of ``EstimatedTotalReadoutTime`` or
``EstimatedEchoSpacing``, or a manually provided fallback ``TotalReadoutTime`` value,
permitting the use of SDCFlows on datasets that do not have reliable timing information
without introducing incorrect metadata into the datasets.

* fix(syn): Re-enable priors respecting ``sd_priors`` argument (#488)
* feat: Add workflow arguments for metadata estimates and fallback TRT (#479)
* feat(syn): Update totalFieldVarianceInVoxel space based on voxel resolution (#487)
* feat(syn): Allow changing laplacians weights in SyN registration metric (#484)
* test(syn): Add a test to exercise SyN workflow creation and check parameters (#486)
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.

3 participants