seeds, affine=None,
step_size=0.5)
streamlines = list(streamline_generator)
We can visualize the streamlines using ``fvtk.line`` or ``fvtk.streamtube``.
fvtk.clear(ren)
fvtk.add(ren, fvtk.line(streamlines, line_colors(streamlines)))
print("Saving illustration as csd_streamlines_eudx.png")
fvtk.record(ren, out_path="csd_streamlines_eudx.png", size=(900, 900))
.. figure:: csd_streamlines_eudx.png
:align: center
**CSD-based streamlines using EuDX**
We used above ``fvtk.record`` because we want to create a figure for the
tutorial but you can visualize the same objects in 3D using
``fvtk.show(ren)``.
To learn more about this process you could start playing with the number of
seed points or, even better, specify seeds to be in specific regions of interest
in the brain.
``fvtk`` gives some minimal interactivity however you can save the resulting
streamlines in a Trackvis (.trk) format and load them for example with the
Fibernavigator_ or another tool for medical visualization.
Finally, let"s save the streamlines as a (.trk) file and FA as a Nifti image.
from nibabel.streamlines import save as save_trk
from nibabel.streamlines import Tractogram
import nibabel as nib
save_trk(Tractogram(streamlines, img.affine), "csd_streamline.trk")
nib.save(nib.Nifti1Image(FA, img.affine), "FA_map.nii.gz")