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