Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: support for multiple trks #42

Open
abeyh opened this issue Oct 8, 2024 · 4 comments
Open

Feature request: support for multiple trks #42

abeyh opened this issue Oct 8, 2024 · 4 comments

Comments

@abeyh
Copy link

abeyh commented Oct 8, 2024

SurfIce is one of my go-to packages for the integrated display of surfaces, surface overlays, and trks. A major drawback at the moment is that SurfIce only supports one trk at a time.

My solution has been to merge the trks of interest using a Matlab script, where I also add a unique scalar value to the streamlines of each trk, which then allows me to display them with different colors in SurfIce.

Although this hack works, it's time consuming because achieving a specific color scheme is not straightforward given that all the trks are displayed as one object, so I'd first need to ensure that the scalar values I assign to the streamlines would map correctly onto a colormap of choice. And then this doesn't always fully work given that all displayed subcomponents must map onto the same colormap, so this poses a big constraint.

It would be extremely useful if SurfIce allowed users to load multiple trks and to at least control the color of each separately.

Thanks!

@neurolabusc
Copy link
Owner

Yes, this is a limitation of Surfice - the challenge is not supporting multiple streamlines, but rather doing so with a clean user interface. I will explore if I can write a loader for Surfice that combines multiple simultaneous streamlines. It is worth noting that our NiiVue does support as many streamline files as you want. While the core NiiVue module is feature complete, the user interface is still evolving. Again, the challenge is supporting a lot of functionality with a clean user interface.

@abeyh
Copy link
Author

abeyh commented Oct 9, 2024

Thank you for looking into this. If the UI is the main hurdle, perhaps a code-based solution could be the way to go? I.e., users would use the usual UI if they only want to display one trk, but would load and display several trks (including choice of color) via the code panel. I imagine that this would be easier to implement, but I may very well be wrong.

@neurolabusc
Copy link
Owner

@abeyh I actually think the script we should use already exists. Here script will concatenate tracts of various formats to the modern TRX format that can store per-vertex, per-streamline, per-group details

You can see the per-vertex and per-streamline effects with the pulldown menu in this NiiVue live demo. Per group coloration is showcased in this NiiVue demo.

Therefore, I will label this as an enhancement and see if we can add full TRX support to NiiVue. TRX is at the Pareto frontier, beating TRK in both load speed and file size.

@abeyh
Copy link
Author

abeyh commented Oct 12, 2024

Thanks, @neurolabusc. Actually, the script you linked to concatenate several streamline files into one is what I am currently doing (except that I am doing it with my own Matlab code). So, good to know that this is the best solution for the moment. My question was about the ability to load several streamline files on the go, without having to concatenate them ahead of time, and to be able to flexibly change their display color in SurfIce individually (not based on streamline properties). In any case, I'll explore NiiVue more and will keep an eye out for developments on that end. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants