[Neuroimaging] deterministic tracking with TensorModel in dipy

Ariel Rokem arokem at gmail.com
Mon Oct 15 18:12:06 EDT 2018


Hi Nico,

Just to follow up on Eleftherios' comments, here is a simple example that I
think does something like what you want to do:

[...]

from dipy.direction import DeterministicMaximumDirectionGetter,
ProbabilisticDirectionGetter

# Choose one of the following:
dg = DeterministicMaximumDirectionGetter  # If you want deterministic
tracking
dg = ProbabilisticDirectionGetter  # If you prefer probabilistic tracking

dg = dg.from_pmf(fit_wls.odf)  # This uses the eigenvalues and eigenvectors
to generate a probability mass function

streamlines_generator = LocalTracking(dg, binary_classifier, ccseeds, aff,
step_size=.1)

[...]


On Wed, Oct 10, 2018 at 2:54 PM Eleftherios Garyfallidis <elef at indiana.edu>
wrote:

> The fit_wls object provides the eigen_directions and eigen_values. These
> are very similar to the concept of peak_directions and peak_values.
> So all you need to do is wrap them in a PeaksAndMetrics object and give it
> as input to the local tracker.
>
> Let me know if this is clear.
>
> On Wed, Oct 10, 2018 at 5:06 PM Nico Hoffmann <nico.hoffmann at tu-dresden.de>
> wrote:
>
>> Dear all,
>>
>> I’m currently implementing certain tractography workflows using dipy and
>> I got spherical harmonics, constrained spherical deconvolution, etc.
>> workflows up and running. However, I’m struggling with the simplest one - a
>> single tensor model (DTI) workflow. I just can't figure out how to track
>> fibres just using this model without any spherical harmonics, ... There are
>> lots of tutorials explaining fibre tracking with quite complex models, yet
>> these approaches (mostly utilizing peaks_from_model(..) ) don’t seem to be
>> useful in case of a single tensor model.
>>
>>
>> My current workflow is:
>>
>> […]
>> import dipy.reconst.dti as dti
>>
>> ccseeds = seeds_from_mask(ccmask, affine=aff)
>> binary_classifier = BinaryTissueClassifier(binarymask == 1)
>>
>> start_time = time.time()
>> dti_wls = dti.TensorModel(gtab_subset)
>> fit_wls = dti_wls.fit(dwi_subset)
>> runtime = time.time() - start_time
>> print('Runtime ' + str(runtime) + 's’)
>>
>> ???
>>
>> streamlines_generator = LocalTracking(???, binary_classifier, ccseeds,
>> aff, step_size=.1)
>> streamlines = Streamlines(streamlines_generator)
>>
>>
>> I’d really appreciate any help!
>>
>>
>> Thank you,
>> Nico
>> _______________________________________________
>> 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/20181015/fdefe04b/attachment.html>


More information about the Neuroimaging mailing list