Reorientation to Canonical RAS with gradient support#1310
Conversation
|
@arnaudbore Are the tests running normally? Or should I do something to trigger them? |
|
@arnaudbore Is it possible to merge Also |
|
Merge done 👍 |
Damn rip BundleParc 2026 -- 2026 Seriously yeah I would need to re-train a model to use 1,2,3 as stride. But that actually means computing FODs on the entirety of the HCP dataset (900+ subjects). @arnaudbore how do you feel about this ? Otherwise, I'll see if I can compute FODs using mrtrix in LAS then convert the basis to descoteaux07 and still have BundleParc work |
…rient_part_2_fix
… transformation and integrate into viz/tracking scripts' as complete
Quick description
This PR is the second part of the StatefulImage transition to fully support default orientation to RAS to increase interoperalibity with mrtrix.
Here is testing data:
https://drive.google.com/file/d/1jsyiL1w9jkFvovOJ7f2AUWT1ifiNl81r/view?usp=sharing
Overall the idea is that either your bvecs and your DWI are already compatible now you can load them together and it internally flip/swap axes to canonical RAS orientation for fitting, modelling and tracking. So this is a minimal set of modifications to have a good idea if the sequence of steps is working.
If your bvecs are an orientation problem, I have now changed the scil_gradients_validate_correct script to reorient your bvecs to fit the DWI in any strides (or voxel order) and be ready for DTI or FODF fit. Extensions to future scripts, such as msmt, COMMIT, fixels or others, will be done later as it requires more thinking and this PR is big enough by itself.
This breaks previously processed DTI, evecs, FOD and peaks. But it does works much better with mrtrix and avoid manual change to 1,2,3 stride.
...
Type of change
Check the relevant options.
Provide data, screenshots, command line to test (if relevant)
...
Checklist