question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WebGL Rendering fails for a High BVAL Diffusion image

See original GitHub issue

000009.dcm.zip

I have no idea why this is failing in WebGL, but it works fine on the canvas renderer.

I get:

WebGL: INVALID_OPERATION: texImage2D: type UNSIGNED_BYTE but ArrayBufferView not Uint8Array
[.Offscreen-For-WebGL-0x7fbf90cd3200]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
seandoylecommented, Mar 27, 2018

I’ve run into a similar issue with some secondary capture images that we generated - the bits allocated was 16 bit but the max pixel value was below 255. In https://github.com/cornerstonejs/cornerstone/blob/master/src/webgl/renderer.js there is the following code: if (image.maxPixelValue > 255) { datatype += '16'; } else { datatype += '8'; } So - WebGL assumes that it’s an 8 bit array - but the pixels are stored in a 16 bit array. I’m not sure what the right fix would be:

  1. If you know that the data only has an 8 bit range - maybe for memory’s sake the data should be copied to an 8 bit array early in the data parsing pipeline.
  2. Or - getImageDataType() needs to look at the DICOM bits allocated instead of max pixel size.

Not sure which is better.

0reactions
swederikcommented, Apr 9, 2018

Fixed by @Zaid-Safadi in #253

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebGL image rendering bad quality - Stack Overflow
I have a problem with image rendering in WebGL: I have a canva, with a quad that takes the whole canvas, and a...
Read more >
How to render large scale images like 32000x32000
I want to get a snapshot of my webgl canvas and I want a high resolution capture so I increased my canvas size....
Read more >
3D Slicer documentation - Read the Docs
Volume Rendering: Provides interactive visualization of 3D image data. • Segmentations: Edit display properties and import/export segmentations.
Read more >
(PDF) The WINSOM solid modeller and its application to data ...
It specializes in handling complex models and provides graphical facilities intended for engineering applications. This paper describes WINSOM ...
Read more >
Creating a web-based 3D interactive resource to teach the ...
To improve understanding of the hippocampus, an interactive, web-based educational resource was created containing a pre-rendered 3D animation and manipulable ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found