-
Notifications
You must be signed in to change notification settings - Fork 45
ENH: Generate cortex mask in anat_fit_wf #482
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
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #482 +/- ##
==========================================
+ Coverage 70.82% 75.21% +4.39%
==========================================
Files 25 25
Lines 2029 2062 +33
Branches 264 266 +2
==========================================
+ Hits 1437 1551 +114
+ Misses 537 444 -93
- Partials 55 67 +12
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:
|
If you want to use the thickness/midthickness GIFTIs as the sources, you're going to need to reorder things so that instead of going |
e.g., - (gifti_surfaces_wf, surfaces_buffer, [
- (f'outputnode.{surf}', surf) for surf in surfs
- ]),
(sourcefile_buffer, ds_surfaces_wf, [('source_files', 'inputnode.source_files')]),
(gifti_surfaces_wf, ds_surfaces_wf, [
(f'outputnode.{surf}', f'inputnode.{surf}') for surf in surfs
]),
+ (ds_surfaces_wf, surfaces_buffer, [
+ (f'outputnode.{surf}', surf) for surf in surfs
+ ]),
])
# fmt:on and - (gifti_morph_wf, surfaces_buffer, [
- (f'outputnode.{metric}', metric) for metric in metrics
- ]),
(sourcefile_buffer, ds_morph_wf, [('source_files', 'inputnode.source_files')]),
(gifti_morph_wf, ds_morph_wf, [
(f'outputnode.{metric}', f'inputnode.{metric}') for metric in metrics
]),
+ (ds_morph_wf, surfaces_buffer, [
+ (f'outputnode.{metric}', metric) for metric in metrics
+ ]), |
I realize that using KeySelect is probably cleaner, but I am not very familiar with that approach.
I opened nipreps/niworkflows#962 to add the filename pattern for this mask. I don't know if |
I thought sMRIPrep used niworkflows@master, and I waited until niworkflows had deployed. Am I missing something? |
Thanks for fixing that @effigies! I think this'll be good to go once CI passes, but I am still not sure |
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.
personally i prefer desc-cortex
over roi
, since the sidecar metadata type is set to roi
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.
LGTM
@effigies I think this is ready for one last review. Also, is there anyone else I should ping for a review? |
@tsalo I wanted to suggest going back to iterables from explicit loops, but the changes would be too extensive to make a suggestion without testing. Please see the latest three commits and let me know if you're good with these changes. |
TBH I knew using iterables would be cleaner, but I never use them in my own code so I figured I'd mess it up. The only thing I want to check is that the Sources are correct in the output JSONs. |
@effigies thank you for refactoring the workflows. I looked at the |
Based on @effigies' idea in nipreps/fmriprep#3491. This new output should make it possible to project data to the surface just using computed derivatives.
Changes proposed:
init_hcp_morphometrics_wf
.init_cortex_mask_wf
.init_anat_fit_wf
that callsinit_cortex_mask_wf
.