[Neuroimaging] [Dipy] discrepancies of SH coeffs with MRtrix

Eric Moulton eric.moulton.jr at gmail.com
Wed Oct 19 03:55:08 EDT 2016

Hello Dipy contributors,

I have been playing with Dipy recently in hopes that I can use it as the
main tool to process my data. In particular, I have been interested in
using MRtrix's mrregister which is linear/non-linear registration technique
based on the SH coefficients (

The papers results have reported that the best registration is obtained
with lmax = 4, so I have calculated the SH coefficient volumes with Dipy
and MRtrix. In Dipy, I did this with peaks_from_model function and making
sh_basis_type='mrtrix' and then using the shm_coeff attribute. In MRtrix, I
used the dwi2fod function. I can develop on this more if you require more
details. In short, both gave me 4D volumes with 15 volumes in the 4th
dimension as expected for lmax = 4.

The first thing I noticed when I compared the two outputs was that the
Y(0,0) volume in Dipy was a single value brain volume where every voxel
coefficient was equal to 0.2821 - which is literally the equation for
Y(0,0) = 1/sqrt(4*pi) - whereas the Y(0,0) volume had different
coefficients for each voxel. I contacted them about this, and they did a
really good job explaining it to me (
In short, they said that Dipy normalizes to the unit integral whereas
MRtrix doesn't.

As I said, my main goal is to use use mrregister and in particular with the
IIT HARDI template (https://www.nitrc.org/frs/?group_id=432) which has the
same MRtrix SH coefficient system (i.e. Y(0,0) is different for every
voxel). But to do that with Dipy, I imagine that I would need to have
similar SH coeff outputs for my data. I have tried playing with the Dipy
code to obtain similar results as with MRtrix (taking out the normalization
term in spherical_harmonics(m,n,theta,phi) in dipy/reconst/shm.py, etc.)
but I still keep getting a single valued brain for the Y(0,0) term that
equals 1/sqrt(4*pi).

I was wondering if someone know where this difference in behavior is coming
from and where I could look to try to get MRtrix-type outputs for the SH

Thank you for your time,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20161019/96d24f64/attachment.html>

More information about the Neuroimaging mailing list