ENH: add gradunwarp base workflow for f/smriprep. #819
ENH: add gradunwarp base workflow for f/smriprep. #819bpinsard wants to merge 23 commits intonipreps:masterfrom
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.
nitransforms should do all the manipulations for you
There was a problem hiding this comment.
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.
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?
effigies
left a comment
There was a problem hiding this comment.
Mostly comments on the nipype interface.
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
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.