-
Notifications
You must be signed in to change notification settings - Fork 28
ENH: Add slice padding to TOPUP #217
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
|
@oesteban I'm a bit confused on how the best way to handle this added slice further down the pipeline. TOPUP now proceeds without error, but sdcflows/sdcflows/workflows/fit/pepolar.py Lines 152 to 154 in a376545
complains of a shape mismatch between the regridded reference fieldmap and the coefficients file. Would it be better to:
|
where exactly? I would expect this, but I don't know where precisely. My first intuition would be to use the padded image as reference for the coefficients. |
|
This is the check sdcflows/sdcflows/interfaces/bspline.py Lines 447 to 454 in d2023f5
For now, I'm testing padding the reference image as well. |
|
Yes, use the padded reference for this interface too 👍 |
oesteban
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.
Left a few comments.
|
Hello @mgxd, Thank you for updating!
To test for issues locally, Comment last updated at 2021-08-24 16:54:14 UTC |
|
I think this is ready, I've opened up #220 to note the unrelated circle failure |
|
I would want to use a few orientations to test that the same ras+ locations have the same values, to make sure we're correctly padding with respect to the affine. |
Co-authored-by: Oscar Esteban <code@oscaresteban.es>
Codecov Report
@@ Coverage Diff @@
## master #217 +/- ##
==========================================
+ Coverage 93.56% 97.13% +3.57%
==========================================
Files 24 24
Lines 1647 1676 +29
Branches 191 192 +1
==========================================
+ Hits 1541 1628 +87
+ Misses 81 25 -56
+ Partials 25 23 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
Hi, to address this issue with odd number of slices with popup, what is recommended now by FSL is to use a specific configuration file that will not use subsampling and will not be affected by a dimension being an odd number. Of note this will increase the execution time of topup in that case. https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=FSL;6c4c9591.2002 Would that be an option in SDCflows to use different configuration files for topup depending on the matrix size of the images? |
|
Thanks for the reference - it is pretty good. I don't think, though, the rationale behind such a recommendation applies here:
|
|
Thank you @oesteban for your quick and detail comments. Very interesting. I did not think about those aspects. I will have to think it through. |
|
Adding a slice should not affect if appended to the right (as in, correct) end of the axis. |
|
ok, sounds good! I will see if I manage to make this work with eddy and eddy_quad doing it right with the slice padding. At the time I made a quick test that did not work and then found Jesper's answer that was pretty convenient for me and did not bother more about changing the number of slice on preprocessing on datasets with odd number of slices. Thank you again for your comments! |
Because of the configuration we're using, TOPUP fails when given an image with an odd number of slices. This adds a new interface
PadSlicethat adds an additional empty slice to images with odd numbered slices.Once I test this, I'll convert out of draft mode.A few questions: