-
Notifications
You must be signed in to change notification settings - Fork 47
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
Handling Arbitrary (>n, where n is not necessarily hardcoded) Numbers of Channels #304
Comments
As a preliminary step, would it be possible to support nine channels for now? I don't have an example image but I conducted a search on how many colors are possible. 8-Plex, 9-Color Field of View Slide Staining is described in the linked document. |
@andreasg123 If I understand you right, I think you are right that the number of channels in an image can be greater than 6. However the number of channels can grow even larger, up to ~40 (in my experience) like here or here. I think the reason we didn't go above 6 was that |
I agree that it is uncommon to have more than 6 channels. However, if adding a few more channels would not be much work as you described above, I think that 9 channels would be a good limit for the near future. If a solution can be found that would allow for an unlimited number of channels without a performance impact for few channels, that would be preferable. In the meantime, a limit slightly higher than 6 would be nice. |
Ok @andreasg123 that can be done. |
Apparently, deck.gl offers hooks to temporarily change blending parameters per draw call: visgl/deck.gl#5450 (comment) |
Closing to track this issue in #687 |
Right now we only support 6 channels and while I think this is fine for a variety of reasons, I am opening this issue for anyone who is interested in investigating/creating a fix for this since it could be fun.
Right now we are blocked from doing this on one shader via an array of textures by #95 (this also would only fix the issue for WebGL2).
In theory we could also set up shader-building code that adds lines of code to the current shaders for
channel7
,channel8
etc. by just injecting code into our shaders (since the code is fairly repetitive) for the sampling, compositing, uniforms etc.A final option would be using separate
XRLayer
layers for each channel. I think this is not the way to go for a few reasons:viridis
magma
etc. type colormapping. In this case blending would not work since we sum up all the intensities and then apply the colormap as opposed to blending the application of the colormap.I am not planning on doing any of these things in the near future but if anyone is curious, I figured I'd put my thoughts into Github issues to give a jumping off point. I think the real way to solve this problem is probably the second option since the first one is only valid for WebGL2, and I think it would be easier than the luma.gl fix.
If I have any of this wrong, feel free to comment!
The text was updated successfully, but these errors were encountered: