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

Could use invert feature already provided by invlerp control #33

Open
jbms opened this issue Nov 17, 2020 · 2 comments
Open

Could use invert feature already provided by invlerp control #33

jbms opened this issue Nov 17, 2020 · 2 comments

Comments

@jbms
Copy link

jbms commented Nov 17, 2020

https://github.com/janelia-cosem/openorganelle/blob/d29e5623c887f8f523acbe29e99ec78047ba3e77/src/api/datasets.ts#L131

I just saw openorganelle --- very nice work.

I wanted to point out that the Neuroglancer invlerp control already allows you to invert the colormap using the "->" arrow, so you could eliminate the separate "invertColormap" control. Granted, the arrow may be less obvious though.

@d-v-b
Copy link
Contributor

d-v-b commented Nov 17, 2020

that's a great tip, I never really liked that pseudo-boolean slider I implemented for the inversion :) It looks like I would need to add shaderControls: {'normalized' : 'range': [start, stop]} property to the layer to get this functionality, is that right?

@jbms
Copy link
Author

jbms commented Nov 17, 2020

The functionality is always there if you use an invlerp control. (You can try clicking on it in one of your dataset views.) If you want it to start out inverted, you can specify shaderControls: {'normalized' : 'range': [stop, start]} (note the reversed bounds). Note that you can also reverse the bounds within Neuroglancer by dragging the left bound past the right bound or vice versa.

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

No branches or pull requests

2 participants