[BUG]: Extra dimension added to parcellation after warping to another template space via ANTs #324
No reviewers
Labels
No labels
CRITICAL
Stale
WIP
bug
concept
coordinate
dataset
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
maintenance
maps
marker
mask
on hold
parcellation
preprocess
question
ready
storage
template-space
triage
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
juaml/junifer!324
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/parcellation-warp-incorrect-ndim"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is there an existing issue for this?
Current Behavior
When I apply a mask in FC extraction using a YAML pipeline it fails.
Expected Behavior
I would like it to apply the mask correctly and not fail.
Steps To Reproduce
Environment
Relevant log output
When I remove
from the marker it works.
I did not actually define a mask in the preprocessor.
I have re-opened it, because the AOMIC ID1000 datagrabber does have BOLD_masks that I should be able to inherit in the marker extraction. But I think the preprocessor for Smoothing from #161 is messing with it.
@LeSasse I believe I've found the bug and it's that when we warp parcellation via ANTs, it somehow adds an extra axis when loading via nibabel. If you try with a parcellation without the need to warp, it'll be ok. So, I've added an explicit
np.squeezein nilearn'smath_img. Check this branch out for your run and let me know if it solves it and you get correct results.Works like a charm!
This now works, the np.squeeze makes sense to me
Codecov Report
All modified and coverable lines are covered by tests ✅
Additional details and impacted files
100.00% <ø> (ø)Flags with carried forward coverage won't be shown. Click here to find out more.