[Neuroimaging] [dipy] Import csd model precomputed by mrtrix

Bago mrbago at gmail.com
Wed May 25 19:41:41 EDT 2016


I believe they did change their basis (please correct me if I'm wrong but I
believe they went from a non-normalized SH basis to a normalized SH basis).

Also projecting onto a sphere is one way to _estimate_ the coefficients in
a different basis. The cleaner way is to just re-order the coefficients and
apply the appropriate scaling. If both basis are normalized (which dipy is)
the scaling should be 1 or -1.

Bago

On Wed, May 25, 2016 at 3:31 PM Ariel Rokem <arokem at gmail.com> wrote:

> On Wed, May 25, 2016 at 1:09 PM, Bago <mrbago at gmail.com> wrote:
>
>> Hi Paolo,
>>   mrtrix and dipy define the SH basis slightly differently, so the
>> precomputed FOD values need to be adjusted if you want to skip the fit step
>> and initialize the Fit object directly. IRC we don't currently have the
>> code to do that, but it would be something we'd like to incorporate.
>>
>> Did they change their basis set when they transitioned to mrtrix3? We do
> have these functions:
>
> https://github.com/nipy/dipy/blob/master/dipy/reconst/shm.py#L852-L923
>
> That should work with the previous version of mrtrix (mrtrix2?). You can
> use these to transform between coefficient sets:
>
>     sf = sh_to_sf(mrtrix_coeffs, sphere, sh_order, basis_type='mrtrix')
>     dipy_coeffs = sf_to_sh(sf, sphere, sh_order, basis_type=None) # This
> defaults to the dipy basis set
>
> and then use the CSD model object to predict:
>
>     from dipy.reconst.csdeconv import  ConstrainedSphericalDeconvModel
>     csd_model = ConstrainedSphericalDeconvModel(gtab, response,
> sh_order=sh_order) # Note: you still need to calculate the response
> function!
>     pred_signal = csd_model.predict(dipy_coeffs, gtab, S0)
>
> I think that something like this should work (but I haven't tried it
> myself).
>
>
>> I have a WIP version of the multi-shell CSD model on a separate branch, I
>> plan on merging it but wasn't intending to get to that for a few months. If
>> you'd like to look at before then I can push the branch up to github.
>>
>> Sounds interesting! I'd love to see what you have so far!
>
> Cheers,
>
> Ariel
>
>
>> Bago
>>
>> On Wed, May 25, 2016 at 2:31 AM Paolo Avesani <avesani at fbk.eu> wrote:
>>
>>> I would like to take advantage of the "predict" method of reconstruction
>>> models in dipy. The goal is to assess the quality of results.
>>>
>>> I have already computed the reconstruction models using mrtrix3 and
>>> stored the ODF files. For this reason I would need to initialize the csd
>>> model by importing the data from ODF stored by mrtrix3.
>>>
>>> The questions are manifold:
>>> - may I initialize the csd model by providing the precomputed values and
>>> skipping the "fit" step?
>>> - may I import the value of precomputed model from a file stored by
>>> mrtrix3?
>>> - is the csd model in dipy compliant with the output of multi-shell csd
>>> model computed by mrtrix3?
>>>
>>> I hope my questions and my goal is formulated clearly.
>>> Thanks for your support.
>>> Paolo
>>>
>>> _______________________________________________
>>> 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
>>
>> _______________________________________________
> 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/20160525/7d60c312/attachment.html>


More information about the Neuroimaging mailing list