[BUG]: Cannot use SpaceWarper to go from Native to template spaces#462
[BUG]: Cannot use SpaceWarper to go from Native to template spaces#462
Conversation
|
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. |
|
|
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:
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #462 +/- ##
==========================================
- Coverage 91.67% 91.66% -0.02%
==========================================
Files 146 146
Lines 6017 6009 -8
Branches 962 961 -1
==========================================
- Hits 5516 5508 -8
Misses 324 324
Partials 177 177
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
b0f9400 to
1aaa91e
Compare
3c1b414 to
d64db4d
Compare
|
@fraimondo Your example now works with the latest commit. Would be great if you could try that for UKB. |
04d6e57 to
ee75e4a
Compare
ee75e4a to
afdfdde
Compare
|
Checked ANTs warping with AOMIC ID1000 and FSL warping with UKB. Should be good to go. |
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
junifer: version: 0.0.7.dev111 python: version: 3.12.7 implementation: CPython dependencies: click: 8.1.7 numpy: 1.26.4 scipy: 1.14.1 datalad: 1.1.4 pandas: 2.2.3 nibabel: 5.3.2 nilearn: 0.10.4 sqlalchemy: 2.0.36 ruamel.yaml: 0.18.6 templateflow: 24.2.2 lazy_loader: '0.4' looseversion: None junifer_data: None system: platform: Linux-6.12.9+bpo-amd64-x86_64-with-glibc2.36 environment: PATH: /home/fraimondo/miniforge3/envs/junifer_dev/bin:/home/fraimondo/.local/bin:/home/fraimondo/miniforge3/condabin:/usr/local/bin:/home/fraimondo/.vscode-server/cli/servers/Stable-6f17636121051a53c88d3e605c491d22af2ba755/server/bin/remote-cli:/home/fraimondo/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/home/fraimondo/.vscode-server/extensions/ms-python.debugpy-2025.10.0/bundled/scripts/noConfigScripts:/home/fraimondo/.vscode-server/data/User/globalStorage/github.copilot-chat/debugCommandRelevant log output
Anything else?
No response