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

Bago mrbago at gmail.com
Thu Oct 20 17:36:49 EDT 2016


Hi Eric,
  Just to be clear, when you call peaks_from_model, which model are you
using. I'm asking because I believe the CsaOdfModel, "constant solid angle"
qball model [1], does produce normalized ODFs (Y(0, 0) = 1 / sqrt(4 * pi)).
This model is conceptually a little different from the model implemented in
MRtrix. Dipy also has a
`ConstrainedSphericalDeconvModel`,
dipy.reconst.csdeconv.ConstrainedSphericalDeconvModel.
This model is going to be more similar to MRtrix. Hope that helps.

Bago

[1] Aganj Reconstruction of the orientation distribution function in
single- and multiple-shell q-ball imaging within constant solid angle.

On Wed, Oct 19, 2016 at 9:28 AM Ariel Rokem <arokem at gmail.com> wrote:

> Hi Eric,
>
> Thank you for your message, and for taking the time to figure these things
> out together.
>
> On Wed, Oct 19, 2016 at 12:55 AM, Eric Moulton <eric.moulton.jr at gmail.com>
> wrote:
>
> 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 (
> http://www.sciencedirect.com/science/article/pii/S1053811911001534#bb0285
> ).
>
> 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 (
> http://community.mrtrix.org/t/first-spherical-harmonic-coefficient-y-0-0-meaning/507/1).
> In short, they said that Dipy normalizes to the unit integral whereas
> MRtrix doesn't.
>
>
> I'm sorry -- I might be misunderstanding what you -- but I am unable to
> reproduce this. When I run this example:
>
> http://nipy.org/dipy/examples_built/reconst_csd.html
>
> setting the `sh_order` keyword argument of
> `ConstrainedSphericalDeconvModel` to 4 (line 170), and then plotting the
> first slice in the `sh_coeff` attribute of the fit object, corresponding to
> Y(0, 0), I get a spatially varying function, as you would expect.
>
> Maybe you could tell me what exactly you are doing? Are you by any chance
> looking at the basis set itself (`csd_model.B_dwi[..., 0]`)? That should be
> a constant for Y(0,0) -- it's a sphere, after all. And indeed, it's all
> equal to 1/sqrt(4pi).
>
> Cheers,
>
> Ariel
>
> 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 coeffs.
>
> Thank you for your time,
> Eric
>
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging
>
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20161020/59a6a642/attachment.html>


More information about the Neuroimaging mailing list