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

Viz: client-side JS for colormapping #74

Open
Tracked by #32
JohnTigue opened this issue Nov 14, 2019 · 6 comments
Open
Tracked by #32

Viz: client-side JS for colormapping #74

JohnTigue opened this issue Nov 14, 2019 · 6 comments

Comments

@JohnTigue
Copy link
Contributor

A Jupyter widget which reads grayscale intensity image data and performs colormapping client-side (maybe as webgl shaders). This is also a way to get a similar effect as described in #59. Pro: more user control of dynamic color mapping, con does not generate a static file (PNG, or animated GIF).

@JohnTigue JohnTigue mentioned this issue Nov 14, 2019
6 tasks
@JohnTigue
Copy link
Contributor Author

JohnTigue commented Nov 15, 2019

How about a mouse/trackpad interface of up-down for z-indexing, and left-right for various smoothly transitioning colormaps. Basically play with that little viewer that jus does up-down for EM data.

Meh. More valuable is probably just having a slider alongside neuroglancer that does "left-right for various smoothly transitioning colormaps." Leave this out of the UI for 3D navigation.

@JohnTigue
Copy link
Contributor Author

JohnTigue commented Jan 23, 2020

@JohnTigue
Copy link
Contributor Author

Transmitting grayscale images is more efficient (single channel vs triple channel is 1:3) In this way clientside colormapping is a form of data compression. It also makes for a more dynamic UX. Of course is requires client-side javascript.

Or maybe CSS/SVG can do it:
https://stackoverflow.com/a/38625471

 <filter id="redselect" color-interpolation-filters="linearRGB">
    <feColorMatrix in="SourceGraphic" result="BigRed"type="matrix" values="0 0 0 0 0
                        0 0 0 0 0
                        0 0 0 0 0
                        3.8 -4 -4 0 -0.5" >
    </feColorMatrix>

    <feColorMatrix type="saturate" values="0" in="SourceGraphic" result="GreySource"/>
    <feComposite operator="in" in="SourceGraphic" in2="BigRed" result="RedOriginal"/>
    <feComposite operator="atop" in="RedOriginal" in2="GreySource" result="final"/>
</filter>

@JohnTigue
Copy link
Contributor Author

@JohnTigue
Copy link
Contributor Author

The switching should be like a header image carousel. A horizontal row of dot/circles that has current image corresponding dot/circle highlighted. Happens on a timer. Transition: some sequential colormap interpolation.

@JohnTigue
Copy link
Contributor Author

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

1 participant