-
Notifications
You must be signed in to change notification settings - Fork 615
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
Complex volume - Continued #2539
base: main
Are you sure you want to change the base?
Conversation
It'd be easier if ImageVisual wasn't as complex (not the data type) as it is. I think maintaining either implementation has pros and cons so whoever wants to do the work gets to choose. |
This is great to see. I am interested if there is a way to unify this with some experiments I have done with 2D transfer functions for volume rendering. The idea basically being that we could move a lot of this logic into something like a 2D colormap with a glsl snippet, instead of being part of the visual itself. For reference here is what I mean regarding a 2D transfer function. On the bottom you see a 2D histogram showing scalar data value (x) and gradient magnitude (y) with the transparent 2D transfer function overlaid. I can envision using the same method but with real/imag as the inputs to the transfer function. |
Are you suggesting to basically have the |
Close, but I think I'm suggesting something a little more sophisticated. It's more like it would skip
Then for a complex image you might supply a transfer function like this to set the opacity by the magnitude, and the color by the phase. If I'm reading the code correctly I don't think this would be possible with the code proposed in this PR.
There might be more elegant APIs, but the simplest way to do this without breaking anything may be to just add a new rendering mode ( |
Interesting... Sounds pretty cool! But this maybe should be handled as a followup PR in case? I don't think we're necessarily making it easier or harder with this PR? |
Yeah that's fair enough - sorry for the noise in that case, I just got excited because it seemed related! What I described might cover the behavior from this PR, but I can appreciate the value in making it simple to do common things (users shouldn't have to write GLSL to just show the magnitude of some complex data). I will polish up what I have to get it ready for a separate PR. |
In the meantime I'll add a couple comments on this PR :). Note Lines 124 to 127 in bac8c07
I also prefer dropping the Finally a tiny nit - I would add a way to toggle the |
No worries, it's good to make sure that we don't mess up possible future/better ideas :P All great suggestions, thanks! |
Picking up the work in #2314; refer to that for previous discussion.