-
Notifications
You must be signed in to change notification settings - Fork 52
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
ENH: add gradunwarp base workflow for f/smriprep. #819
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #819 +/- ##
==========================================
- Coverage 68.52% 62.96% -5.57%
==========================================
Files 86 55 -31
Lines 8220 6316 -1904
Branches 949 914 -35
==========================================
- Hits 5633 3977 -1656
+ Misses 2580 2152 -428
- Partials 7 187 +180
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I'm guessing if you want circle / gh to run the test, you'll need to install gradunwarp right? |
niworkflows/workflows/gradunwarp.py
Outdated
itk_warp_data = fsl_warp.get_fdata().reshape(fsl_warp.shape[:3]+(1,3)) | ||
itk_warp_data[...,(0,1)] *= -1 | ||
itk_warp = fsl_warp.__class__(itk_warp_data, fsl_warp.affine) | ||
itk_warp.header.set_intent("vector") | ||
out_fname = fname_presuffix(in_warp, suffix="_itk", newpath=os.getcwd()) | ||
itk_warp.to_filename(out_fname) |
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.
nitransforms should do all the manipulations for you
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.
I might have missed something, but from what I understood what needs to be provided to Ants ApplyTransform are ITK warpfields. In nitransforms I cannot see any function to output non-linear warp in ITK format from nitransforms object https://nitransforms.readthedocs.io/en/latest/_api/io.html#nitransforms.io.itk.ITKDisplacementsField, it seems to only deal with inputs. Thus, my attempt to invert that input step.
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.
Yeah, it looks like you are totally right (and I did the same here a while ago - https://github.com/nipreps/sdcflows/blob/375dd7a024abcd5d4d2b282241a037d76f9719e6/sdcflows/transform.py#L286-L292)
Would you like to become a proud contributor to nitransforms? :D
If not (or either way, actually), may I ask you to file an issue requesting this to be implemented there?
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.
Mostly comments on the nipype interface.
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
559c8a1
to
a4d7e3b
Compare
I don't understand why I am getting errors on the T1w file when testing the gradunwarp pipeline. How does that ds0000030 differs from the openeuro one? |
Working on nipreps/fmriprep#1550.
Relies on an updated version of the gradunwarp https://github.com/bpinsard/gradunwarp/tree/fix/mem_leaks.