You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I need to visualize tractography streamlines that have different widths (representing axonal diameters), but I can only provide the actor.streamtube function with a single linewidth.
Describe the solution you'd like
I'd like for actor functions that accept a linewidth argument (Ex: actor.streamtube, actor.line) to also accept an arraylike version for per-streamline width.
Describe alternatives you've considered
I have tried looping through each streamline and adding them separately to the scene, with no success.
s = window.Scene()
for i, line in enumerate(tractogram.streamlines[:5]):
line_actor = actor.streamtube(line, colors=[1., 0., 0.], opacity=0.5, linewidth=diameters[i])
s.add(line_actor)
actor.streamtube gets me an empty scene, no matter what other actor I add to the scene. It kills the thing 😅
Edit:
This solution actually works by changing it to ... actor.streamtube([line], .... The errors were simply related to that.
It's a suboptimal solution, but my problem is fixed for now. I'll keep the issue open as the feature still seems relevant and rather quick to add.
Additional context
An example of what I'm trying to achieve, but with variable streamline widths:
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I need to visualize tractography streamlines that have different widths (representing axonal diameters), but I can only provide the
actor.streamtube
function with a single linewidth.Describe the solution you'd like
I'd like for actor functions that accept a linewidth argument (Ex:
actor.streamtube
,actor.line
) to also accept an arraylike version for per-streamline width.Describe alternatives you've considered
Edit:
This solution actually works by changing it to
... actor.streamtube([line], ...
. The errors were simply related to that.It's a suboptimal solution, but my problem is fixed for now. I'll keep the issue open as the feature still seems relevant and rather quick to add.
Additional context
An example of what I'm trying to achieve, but with variable streamline widths:
The text was updated successfully, but these errors were encountered: