janelia-cellmap / openorganelle

A portal for viewing FIB-SEM datasets
Other
10 stars 2 forks source link

Could use invert feature already provided by invlerp control #33

Open jbms opened 4 years ago

jbms commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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.