[BUG]: Cannot use SpaceWarper to go from Native to template spaces #462
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!462
Loading…
Reference in a new issue
No description provided.
Delete branch "update/bold-native-to-mni-warping-fsl"
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
I have a dataset in which I have the BOLD in native space, ref in MNI space and warp files to convert from native to MNI (using fsl).
I would like to compute some markers in MNI space.
I set up a pipeline using a datagrabber, default data reader, space warper and marker, with a parcellation in MNI space.
The pipeline fails:
Indeed, the traceback indicates that this is because it assumes that we have data in one template space and want to work on another template space.
Looking at the logic, we are not checking the src space, but the dst space. So currently, the SpaceWarper allows to warp to MNI or T1w references, starting always from MNI space.
Expected Behavior
I would expect that the SpaceWarper is able to warp from native to template, provided that the warping/reference files are there.
Steps To Reproduce
Environment
Relevant log output
Anything else?
No response
The reference for the warping.
No. Just check the code I've pasted. We have BOLD data in native space, with the files (ref+warp) to warp the BOLD into MNI space. I would like that we are able to use the SpaceWarper to do this transform at preprocessing.
SpaceWarper(reference="T1w", using="fsl", on="BOLD")The error you get is due to the fact that you wanted to convert to a template space named explicitly via FSL. We support this operation via ANTs as we don't have transform files from one MNI template space to other in FSL format.
That's a working example of the issue we need to solve. The use-case is for UKB data.
It's not converting template space. We have cleaned BOLD in native space and warp files (ref + warp) from native to MNI.
In short, this example should work.
For future reference:
https://juaml.github.io/junifer/pr-preview/pr-462/
Built to branch
gh-pagesat 2025-09-24 13:53 UTC.Preview will be ready when the GitHub Pages deployment is complete.
Codecov Report
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.66%. Comparing base (
151631c) to head (afdfdde).Additional details and impacted files
100.00% <ø> (ø)Flags with carried forward coverage won't be shown. Click here to find out more.
96.15% <ø> (-0.52%)100.00% <ø> (ø)93.33% <ø> (-0.79%)🚀 New features to boost your workflow:
@fraimondo Your example now works with the latest commit. Would be great if you could try that for UKB.
Checked ANTs warping with AOMIC ID1000 and FSL warping with UKB. Should be good to go.