Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Conversion from MRTrix SH basis to dipy #1782
MRtrix3 changed their SH basis moving from versions (0.2.x) to (0.3.x) (details here).
The difference between the MRtrix3 and Dipy SH bases now just has to do with the ordering of the coefficients, and a somewhat complicated (-1)^m factor.
I wrote a quick function that will reorder mrtrix3 SH images into the Dipy basis, so that I can import FODs/etc. computed with mrtrix3 into python for further processing and visualization using Dipy.
Here is a jupyter notebook I made including the function and a quick toy example validating that both softwares expand the same data onto the same coefficients after the mrtrix3 coefficients are converted into the Dipy basis.
I'm happy to make a PR to include this in "dipy/reconst/shm.py" if it would be useful, otherwise I thought I'd just post it here for others to find as needed.