[Neuroimaging] [DIPY] propagator anisotropy estimation using MAP(L)MRI

Rutger Fick fick.rutger at gmail.com
Wed Apr 25 11:50:03 EDT 2018


Hi Ping,

To answer your questions:

On parallelization:
Dmipy uses the pathos package to parallelize voxel-wise fitting of the
voxels inside the estimation mask.
It's doing multi-processing (not multi-threading), so it depends on the
number of cores your computer/cluster has.
It should use it automatically after you pip install pathos.

On Modeling:
Dmipy's philosophy is that there is no 'default' model. The one in the
example is just to show off dmipy's capabilities. You can generate the FOD
model with only 1 bundle by just setting Ncompartments=1 in

parametric_fod_model = mcmdi_fit_patch.return_parametric_fod_model(
    distribution='watson', Ncompartments=1)

The fastest way to create a map of the number of estimated peaks per voxel
is dipy's peaks_from_model example
<http://nipy.org/dipy/examples_built/reconst_csd.html>.
Keep in mind that dipy's CSD model implementation is not appropriate for
multi-shell data, so you need to fit it to only one of your higher b-value
shells (or risk noisy results).

Alternatively, you can directly dmipy's (possibly multi-compartment)
multi-shell implementation of CSD illustrated here
<http://nbviewer.jupyter.org/github/AthenaEPI/dmipy/blob/master/examples/example_multi_compartment_constrained_spherical_deconvolution.ipynb>,
but then for the moment you need to pass the estimated FOD sphere function
to dipy's "peak_directions
<https://github.com/nipy/dipy/blob/b1c80793750ae849ed2fa9cb6ffda823382f1a12/dipy/direction/peaks.py#L93>"
function to get the peaks.

There's no direct function in dmipy (or dipy) to save the FODs to disk, but
you can easily extract the FOD spherical harmonics or sphere functions
arrays and save them to disk as a nifti using nibabel, see bottom here
<http://nipy.org/dipy/examples_built/quick_start.html>, to be used whenever
you want.

Best,
Rutger


On 25 April 2018 at 15:15, Ping-Hong Yeh <pinghongyeh at gmail.com> wrote:

> Hi Rutger,
>
> Thank you for the details.
>
> Could you elaborate on doing the parallel processing using multi-threads,
> multi-cores?
> For the FODs estimation, is the 2-bundle fitting a default model? how
> could the ROI mask be created based on the CSD parameters? Can the FODs be
> saved and called for later fiber tracking use?
>
> Thank you for providing this great tool.
>
> Ping
>
>
> On Wed, Apr 25, 2018, 6:06 AM Rutger Fick <fick.rutger at gmail.com> wrote:
>
>> Hi Ping,
>>
>> That's a great dataset you're using!
>>
>> Estimating the MC-MDI model itself is quite fast, I think a full HCP
>> subject takes less than an hour.
>> However, the secondary parametric FOD estimation in the example
>> (optimizing 2 bundles with slow but accurate MIX approach [1]) takes more
>> than a second per voxel.
>> You can speed this up by using more cores to parallelize the optimization
>> more, but it will inherently not be very fast [1].
>> Alternatively, you can choose to only fit one bundle and use "brute2fine"
>> optimization, which is much faster and probably feasible to fit to all your
>> volumes in a more reasonable time.
>>
>> Moreover, investigating the dispersion in crossings using this 2-bundle
>> MC-MDI model is very interesting (and has not been done as far as I know),
>> but I don't recommend to fit this model to your data as a whole.
>> Fitting a 2-bundle model to single-bundle data is a degenerate problem
>> (many solutions with similar fitting error), so the dispersion parameters
>> outside crossing bundles won't be meaningful (see our NODDIx example
>> <http://nbviewer.jupyter.org/github/AthenaEPI/mipy/blob/master/examples/example_mix_microstructure_imaging_in_crossings.ipynb>
>> ).
>> To still use this 2-bundle model, I suggest to make a mask where you know
>> there is more than 1 peak (using CSD for example), and only fit the
>> multi-bundle model inside these ROIs.
>>
>> If you're also interested in using tractography-based comparison on your
>> dataset, we'll also soon release CSD-based FOD estimation for the MC-MDI
>> model (winning method of 2017 ISMRM tractography competition
>> <https://my.vanderbilt.edu/ismrmtraced2017/>).
>>
>> Let me know how it goes :-)
>> Rutger
>>
>> [1] Farooq, Hamza, et al. "Microstructure imaging of crossing (MIX) white
>> matter fibers from diffusion MRI." *Scientific reports* 6 (2016): 38927.
>>
>>
>> On 23 Apr 2018 17:34, "Ping-Hong Yeh" <pinghongyeh at gmail.com> wrote:
>>
>> Hi Rutger,
>>
>>  Thanks for the fix.
>>
>> Do have the estimate of approximate time needed for doing mcdmi_fod_fit
>> on a data of 240*240*187 with 1mm in resolution for total 289 volumes?
>>
>> It has been running for more than 2 days on a MAC OS with 2 X 2.66 GHz
>> 6-Core, 96GB memory machine.
>>
>>
>> Thank you.
>>
>> Ping
>>
>> On Sun, Apr 22, 2018 at 6:10 PM, Rutger Fick <fick.rutger at gmail.com>
>> wrote:
>>
>>> Hi Ping,
>>>
>>> Great to hear you're trying the toolbox!
>>>
>>> Thanks for pointing out the bug, I just fixed it in the repository, so
>>> you should be able to load the gradient directions without having the error
>>> now.
>>>
>>> Dmipy is completely general in that it can import any PGSE-based
>>> acquisition scheme with any number of non-diffusion weighted volumes. Dmipy
>>> internally normalizes the signal according to the mean of all b0-values,
>>> and automatically detects which measurements belong to the same acquisition
>>> shell.
>>>
>>> Let me know if you have any more questions or just generally what your
>>> experience is using dmipy :-)
>>>
>>> Best,
>>> Rutger
>>>
>>> On 21 April 2018 at 19:54, Ping-Hong Yeh <pinghongyeh at gmail.com> wrote:
>>>
>>>> Hi Rutger,
>>>>
>>>> The failure was caused by multiple [ 0 0 0]  arrays in the gradient
>>>> table that were used for acquiring non-diffusion weighted volumes. It
>>>> started running after I modified the gradient  table by adding 1 to the
>>>> z-direction of [ 0 0 0] to become [ 0 0 1].
>>>> Can dmipy import the gradient DWI volumes with multiple non-diffusion
>>>> weighted volumes interspersed in-between?
>>>>
>>>> Thank you.
>>>>
>>>> Ping
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>
>>
>> _______________________________________________
>> 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/20180425/b7d688f4/attachment.html>


More information about the Neuroimaging mailing list