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

Support for uint16 color data #3781

Closed
normanrz opened this issue Feb 14, 2019 · 3 comments · Fixed by #4152
Closed

Support for uint16 color data #3781

normanrz opened this issue Feb 14, 2019 · 3 comments · Fixed by #4152

Comments

@normanrz
Copy link
Member

Many microscopes, CTs etc output 16 or even 32 Bit data. WKW also supports these formats. Would be great if wk could also display this data. I think the data would be recalculated to 8-Bit in a shader with contrast/brightness settings in mind.

@philippotto
Copy link
Member

Let's investigate the amount of work needed for this by looking at our code thoroughly.

@philippotto philippotto self-assigned this Mar 28, 2019
@philippotto
Copy link
Member

philippotto commented Mar 28, 2019

From my investigation, the required effort should be minimal. getData isn't called on many sites and the interface of getDataValue (which uses getData) should stay untouched. Most of the code, which is interested in the actual bucket data, is segmentation code anyway (for which we already support uint16).

Two things need to be done:

  • adapt the shader so that 16 bit color data is correctly displayed
  • ideally, refactor the data bucket class to not use Uint8Array everywhere but instead use a data view which depends the actual format. not too sure, though, whether it's worth it. can be investigated when doing actually doing the issue.

@daniel-wer
Copy link
Member

daniel-wer commented May 22, 2019

I just did another small test with a uint16 layer I built (see attached zip) to see what's still needed for this (now that we've added the float layer support and generalized the data handling a bit):

  • adapt the shader so that 16 bit color data is correctly displayed (ideally should be done in conjunction with the histogram PR to avoid merge conflicts)
  • the backend doesn't send enough data for uint16 color layer buckets, looks like it automatically assumes uint8 (/cc @fm3)
  • low-pri: the backend doesn't detect uint16 color layers correctly when importing the dataset (detects uint8 instead)

color_uint16.zip

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

Successfully merging a pull request may close this issue.

3 participants