How to show streamlines from mrtrix3 in DIPY with an orientation color?


I want to visualize my streamline tracts from mrtrix3(.tck file) in DIPY, I tried the codes in DIPY : Docs 1.7.0 - Visualize bundles and metrics on bundles

However, my tract image has no orientation color but just a specific color. I have no idea about this.
My codes as follows:

import numpy as np
from dipy.viz import window, actor, colormap, ui
from import load_tck
from import load_nifti
# loadt tck
tckfile = load_tck("tract.tck", "dti.nii.gz")
# load struture
imgT1, imgT1_affine = load_nifti("T1.nii.gz")
scene = window.Scene()
stream_actor = actor.line(tckfile.streamlines)
imgT1_actor = actor.slicer(imgT1, imgT1_affine)
show_m = window.ShowManager(scene, size=(800, 600))

Furthermore, I actually want to render the streamline like this:

Any idea or reference code to achieve this?

PS: I tried this example (Visualizing AFQ derivatives — AFQ 1.0.1 documentation), when I download data provided by the example (HBN POD2), I can get the same result (same as the pic above). But if I load my own tract file (.tck generated from mrtrix3), I can not use the orientation color. Does the tck file lost some information? But I remember when I loaded it, I provided space file (tckfile = load_tck(“tract.tck”, “dti.nii.gz”)). I really have no idea about it.

Thanks a lot!