-
Notifications
You must be signed in to change notification settings - Fork 28
FIX: Generation of RAS displacements fields from VSMs #237
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
Conversation
|
@mgxd this (in combination with the latest fMRIPrep integration) should fix things for your dataset - please let me know |
2b45237 to
fd74249
Compare
|
I'm writing some unit tests, just to be sure this is what we need. |
After much thought, I have come to the conclusion that the VOX2RAS affine must be applied in all cases, regardless of whether the dataset is oblique or not. After all, the VSM (voxel-shift-map) is no more than a regularly gridded field of voxel coordinates. The transformation between voxels and mm is biyective and univocal, and formalized by the affine matrix of the image. This PR simplifies the calculation, and theoretically should resolve most of the issues we are experiencing when resampling data. Resolves: #218. Resolves: #236. Related: nipreps/fmriprep#2210.
fd74249 to
5a8a75c
Compare
effigies
left a comment
There was a problem hiding this 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. Made some very small suggestions, but feel free to reject without argument.
Co-authored-by: Chris Markiewicz <markiewicz@stanford.edu>
|
I'm writing a test with a numerical phantom. I have been able to compare the correction with our |
Co-authored-by: Chris Markiewicz <markiewicz@stanford.edu>
e38f01b to
3642514
Compare
f36338e to
d9c142b
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #237 +/- ##
==========================================
- Coverage 85.31% 85.28% -0.04%
==========================================
Files 25 25
Lines 1771 1767 -4
Branches 205 205
==========================================
- Hits 1511 1507 -4
Misses 230 230
Partials 30 30
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
effigies
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving again. Very convincing test!
Yup, it doesn't tell you that we have a good implementation of fieldmaps, but we are safe to say that, once you have the fieldmap our tool and ANTs will apply the transform the same. So it indeed resolves the unit test :) Merging in, we can include @mgxd on his data later down the line. |
After much thought, I have come to the conclusion that the VOX2RAS affine must be applied in all cases, regardless of whether the dataset is oblique or not.
After all, the VSM (voxel-shift-map) is no more than a regularly gridded field of voxel coordinates. The transformation between voxels and mm is biyective and univocal, and formalized by the affine matrix of the image.
This PR simplifies the calculation, and theoretically should resolve most of the issues we are experiencing when resampling data.
Resolves: #218.
Resolves: #236.
Related: nipreps/fmriprep#2210.