27d10570af678e1059920c4ae895860dda11433c,doc/examples/tracking_quick_start.py,,,#,33

Before Change


slice_no = data.shape[2] // 2

fvtk.add(ren, fvtk.peaks(csd_peaks.peak_dirs[:, :, slice_no:slice_no + 1],
                         stopping_values[:, :, slice_no:slice_no + 1]))

print("Saving illustration as csd_direction_field.png")
fvtk.record(ren, out_path="csd_direction_field.png", size=(900, 900))

After Change


which we will use as the basis to perform the tracking.


ren = window.Renderer()
ren.add(actor.peak_slicer(csd_peaks.peak_dirs, csd_peaks.peak_values))

if interactive:
    window.show(ren, size=(900, 900))
else:
    window.record(ren, out_path="csd_direction_field.png", size=(900, 900))


.. figure:: csd_direction_field.png
 :align: center

 **Direction Field (peaks)**

``EuDX`` [Garyfallidis12]_ is a fast algorithm that we use here to generate
streamlines. This algorithm is what is used here and the default option
when providing the output of peaks directly in LocalTracking.


streamline_generator = LocalTracking(csd_peaks, tissue_classifier,
                                     seeds, affine=np.eye(4),
                                     step_size=0.5)

from dipy.tracking.streamline import Streamlines

streamlines = Streamlines(streamline_generator)


We can visualize the streamlines using ``actor.line`` or ``actor.streamtube``.


ren.clear()
ren.add(actor.line(streamlines))

if interactive:
    window.show(ren, size=(900, 900))
else:
    print("Saving illustration as det_streamlines.png")
    window.record(ren, out_path="det_streamlines.png", size=(900, 900))


.. figure:: det_streamlines.png
 :align: center
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: nipy/dipy
Commit Name: 27d10570af678e1059920c4ae895860dda11433c
Time: 2017-06-26
Author: garyfallidis@gmail.com
File Name: doc/examples/tracking_quick_start.py
Class Name:
Method Name:


Project Name: nipy/dipy
Commit Name: c2cfaf314a381e520883eba2d965cd93fd5572e0
Time: 2019-07-21
Author: girard.gabriel@gmail.com
File Name: doc/examples/tracking_bootstrap_peaks.py
Class Name:
Method Name:


Project Name: nipy/dipy
Commit Name: aac7b54c8d6957786a9aa70e896cef10fe0ab9fe
Time: 2019-07-21
Author: girard.gabriel@gmail.com
File Name: doc/examples/tracking_pft.py
Class Name:
Method Name: