Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@effigies
Copy link
Member

The SyN transform parameters are:

SyN[gradientStep,<updateFieldVarianceInVoxelSpace=3>,<totalFieldVarianceInVoxelSpace=0>]

The size of estimated displacements should not depend significantly on the voxel size. This change updates the totalFieldVarianceInVoxelSpace to mm values of 10mm and 0.5mm in the sd_syn.json files, and adds an interface to convert these to voxels based on the resolution in the phase-encoding direction.

@codecov
Copy link

codecov bot commented Mar 26, 2025

Codecov Report

Attention: Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 84.32%. Comparing base (a8fb727) to head (8bc08c0).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
sdcflows/workflows/fit/syn.py 96.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #487      +/-   ##
==========================================
+ Coverage   83.98%   84.32%   +0.34%     
==========================================
  Files          30       30              
  Lines        2828     2846      +18     
  Branches      367      367              
==========================================
+ Hits         2375     2400      +25     
+ Misses        384      376       -8     
- Partials       69       70       +1     

☔ 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.

@effigies effigies force-pushed the calculate-transform-parameters branch from 4708c71 to 308f8ff Compare March 26, 2025 17:14
@effigies
Copy link
Member Author

I've been reading ANTsX/ANTs#734, and it looks all measurements are relative to the fixed image, so I should change this from moving to fixed.

@effigies effigies force-pushed the calculate-transform-parameters branch from 308f8ff to da18a46 Compare March 26, 2025 19:27
@effigies effigies force-pushed the calculate-transform-parameters branch from da18a46 to 227f28b Compare March 26, 2025 19:30
oesteban
oesteban previously approved these changes Mar 26, 2025
syn_config = data.load(f"sd_syn{'_sloppy' * sloppy}.json")

vox_params = pe.Node(niu.Function(function=_mm2vox), name="vox_params")
vox_params.inputs.registration_config = json.loads(syn_config.read_text())
Copy link
Member

Choose a reason for hiding this comment

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

Since we need to read the config outside the Registration node, we might want to extract the number of levels from it (e.g., len(config_dict['transforms']) instead of hard-code the magic number (of 2). It will be a bit trickier for handling masks, but a bit more robust, IMHO.

Copy link
Member

Choose a reason for hiding this comment

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

But probably for another PR btw

@effigies effigies merged commit 7f47d73 into nipreps:master Mar 26, 2025
18 checks passed
@effigies effigies deleted the calculate-transform-parameters branch March 26, 2025 20:50
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.

2 participants