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

[Bug] Problem displaying some images in Chrome mobile #1678

Open
abasb75 opened this issue Dec 5, 2024 · 19 comments
Open

[Bug] Problem displaying some images in Chrome mobile #1678

abasb75 opened this issue Dec 5, 2024 · 19 comments

Comments

@abasb75
Copy link

abasb75 commented Dec 5, 2024

Describe the Bug

hi,
I was updating to the cornerstone3D from old cornerstone, but I noticed that some images are not displayed in Chrome Mobile.
Screenshot from 2024-12-05 19-24-01

But this problem does not exist in Firefox.
Screenshot from 2024-12-05 19-35-24

i test in ohif viewer local and cornerstone live example (https://www.cornerstonejs.org/live-examples/local). They also have problems:
Screenshot_20241205_151351_com android chrome

Steps to Reproduce

There is a problem in displaying the images of Dicom Android Chrome

The current behavior

There is a problem in displaying the images of Dicom Android Chrome

The expected behavior

There is a problem in displaying the images of Dicom Android Chrome

OS

android

Node version

20

Browser

chrome

Copy link
Member

sedghi commented Dec 5, 2024

Hmm, I think Chrome on Android might have a bug. What Android phone are you using? We test our rendering on the Pixel 8.

@abasb75
Copy link
Author

abasb75 commented Dec 5, 2024

huawie p50 with latest version of chrome: snapdragon 888 with 8gb ram.

I have uploaded some images having this problem on cornerstone3D in the link below:
https://github.com/abasb75/dicom-parser/tree/main/test-dcm

Please check one or two of the images. all of image displayed on cornerstone v2 without any problem.

Can the problem be from vtk-js?

@sedghi
Copy link
Member

sedghi commented Dec 5, 2024

Not sure really since firefox works. I don't have huawie p50, so i don't think i can debug this really

@abasb75
Copy link
Author

abasb75 commented Dec 5, 2024

i make an example for this issue. do you have not problem on your phone so can you see rendered image on mobile chrome?
https://abasb75.github.io/corenerstone-test-react-vite/

@daker
Copy link
Contributor

daker commented Dec 6, 2024

Similar issue #1653 it's due to OES_texture_float_linear extension support missing in Chrome GPU driver on Huawei devices

@934556826
Copy link

I downgraded to cornerstone3D@^1.78.1, and it can render normally, but some very old models, such as Huawei mate9, still cannot render

@abasb75
Copy link
Author

abasb75 commented Dec 7, 2024

this is my console warning :
[.WebGL-0xd7ad6300]RENDER WARNING: texture bound to texture unit 0 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?

@abasb75
Copy link
Author

abasb75 commented Dec 7, 2024

it's seem problem is related to rescaleIntercept if has -1024 value. when i change this code :
Screenshot from 2024-12-07 11-01-29
image will render badly.
Screenshot from 2024-12-07 10-58-08-1

@Steven-DD
Copy link

I think you can try to see if this plugin is missing OES_texture_float,I saw a reply to this in the openlayers issues,I think you may be experiencing the same problem!

@abasb75
Copy link
Author

abasb75 commented Dec 9, 2024

I think you can try to see if this plugin is missing OES_texture_float,I saw a reply to this in the openlayers issues,I think you may be experiencing the same problem!

i check and
Screenshot from 2024-12-09 11-55-20

and OES_texture_float is avaible in p50 model

@Steven-DD
Copy link

https://webglreport.com
Are there any unsupported plugins in this list?

@Steven-DD
Copy link

Steven-DD commented Dec 9, 2024

Can you provide your Android version?
If this image works on other phones and GPU rendering modes, then the probability is that the problem is with WebGL support.

@abasb75
Copy link
Author

abasb75 commented Dec 9, 2024

1

image displayed in other webgl base viewer. for example meddream:
2

@Steven-DD
Copy link

Steven-DD commented Dec 9, 2024

If so, would trying to update the Android version solve the problem, the version shown in the test report seems to be Android 12

My guess is that the problem is probably a version compatibility issue, cornerstonejs may be using some poorly-compatible api, and there have also been problems with WebGL support on Android versions pointed out in other forums, with the problem occurring more often on the lower Android versions.

On meddream they may have a special way of handling it, apparently they have better support on older/lower version phones.

Copy link
Member

sedghi commented Dec 9, 2024

You need to send the webgl 2 (notice 2.0) report, not 1

@abasb75
Copy link
Author

abasb75 commented Dec 10, 2024

Screenshot_20241210_134505_com android chrome
Screenshot_20241210_134456_com android chrome

OES_texture_float not avaibaled in webgl2. it is not related to device

@daker
Copy link
Contributor

daker commented Dec 11, 2024

Try to see why it's not available by checking chrome://gpu adresse in chrome, maybe the extension is disabled for some reason

@abasb75
Copy link
Author

abasb75 commented Dec 12, 2024

Try to see why it's not available by checking chrome://gpu adresse in chrome, maybe the extension is disabled for some reason

i found reason of issue is not OES_texture_float supporting. probably, reason of issue is Max textturesize limit on chrome android that is 4096 but in firefox (android/pc) or chrome pc is 16384.

@sedghi
Copy link
Member

sedghi commented Dec 12, 2024

4096 should we good enough for most data sizes, means the dimension in each direction should be less than 4096

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

5 participants