-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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] OHIF not working on some Android devices #4286
Comments
Have you tried on more recent android os? |
Hello Sedghi, many users do not have the financial capacity to maintain the latest generation equipment. |
Hello @sedghi! We’ve tested the OHIF viewer on a Samsung device running Android 13 and encountered the same problem with instances not displaying correctly: Additionally, we’ve tested it on a Pixel device running Android 12, and instances are loaded properly: |
Hi @sedghi! I wanted to follow up on this issue to see if there have been any updates or if there’s any guidance you could provide to help resolve it. Thanks! |
I think you need to find the configuration that works best for you. You can force CPU rendering, which might be suitable for some use cases, but you won't get MPR, segmentation, and 3D rendering. Take a look at the https://github.com/cornerstonejs/cornerstone3D/blob/main/packages/core/src/init.ts // TODO: Change config into a class with methods to better control get/set
const defaultConfig = {
gpuTier: undefined,
detectGPUConfig: {},
isMobile: false, // Is mobile device
rendering: {
useCPURendering: false,
// GPU rendering options
preferSizeOverAccuracy: false,
useNorm16Texture: false,
strictZSpacingForVolumeViewport: true,
},
// Cache
enableCacheOptimization: true,
/**
* Imports peer modules.
* This may just fallback to the default import, but many packaging
* systems don't deal with peer imports properly.
*/
peerImport: (moduleId) => null,
};
```origin/m |
I’ve tested it, and yes, it will resolve the issue. However, the following problems remain: |
I also have this problem. Is there a way to define useCPURendering only on Android devices? |
Can you check the latest OHIF viewer, which now includes Cornerstone 3D 2.0? Here are the migration guides: Try OHIF locally: https://viewer-dev.ohif.org/localbasic |
I got report about this issue, and today I tested it at Samsung A35, android 14. It's working on both, a bit old OHIF and latest OHIF. @ionutdobre Which Samsung phone did you test? mid, low-range.. specifically? still persist? |
@ionutdobre can you try on the latest release and let us know? |
cornerstonejs/cornerstone3D#978 Relevant issue at Cornerstone repo as well |
cornerstonejs/cornerstone3D#978 (comment) At least, at Samsung Galaxy S23 Ultra, it works, just change config setup. Thank you for your suggestion @sedghi |
@sedghi We’ve just tested the study - https://viewer.ohif.org/viewer?StudyInstanceUIDs=2.16.840.1.114362.1.11972228.22789312658.616067305.306.2 - on a Samsung Galaxy A13 (https://en.wikipedia.org/wiki/Samsung_Galaxy_A13), and the error still persists. We've detected that the issue originates from a bug in the VTK library, as described here: Kitware/vtk-js#3117 |
I'm not really sure. How did you conclude that the VTK PR is causing it? That actually makes a lot of sense. Could you share the results from webglreport.com, especially the supported extensions? You might need to scroll down a bit. CCing @slak44 too |
The VTK PR is not the cause, rather a solution to this issue. To be precise, it's the solution for studies whose texture data fits in 16 bit floats. For studies where it doesn't fit, you can enable preferSizeOverAccuracy which "fixes" them as well, at the cost of accuracy. Unfortunately OHIF master is on the last vtk version that doesn't include the PR (32.1.0 vs 32.1.1), which is probably why viewer.ohif.org still has the issues mentioned in the comment above. As I mentioned in the PR, the combination of having webgl2 available, but not OES_texture_float_linear is what triggers the problem, and we found this most often occurs on Androids with Mali GPUs. If you really want that webgl report, @ionutdobre (we work together) can track down a device like this to get that list of supported extensions. And if anyone else is interested in using preferSizeOverAccuracy, something like this in your OHIF config would do it: const testCanvas = document.createElement('canvas');
const context = testCanvas.getContext('webgl2');
const hasWebGL2 = context !== null;
const hasOESTextureFloatLinear = !!context?.getExtension('OES_texture_float_linear');
const config = {
// ...
preferSizeOverAccuracy: hasWebGL2 && !hasOESTextureFloatLinear
// ...
}; |
Thanks @slak44 i will update our version then |
Can you check in 10 mins or so https://viewer-dev.ohif.org/ ? |
Any update here? |
I got a device to test. It works on viewer-dev now, and it doesn't on the regular viewer, so something has definitely changed: https://viewer-dev.ohif.org/viewer?StudyInstanceUIDs=2.16.840.1.114362.1.11972228.22789312658.616067305.306.2 |
viewer.ohif.org has not been updated yet. So great news. Thanks @slak44 |
@sedghi I tested it and it keeps happening. |
related Kitware/vtk-js#3194 |
Describe the Bug
Hi! We have encountered an issue with the latest OHIF viewer on certain Android devices. Specifically, the viewer fails to display instances correctly, resulting in a fully black or grey image. This problem is reproducible on a Samsung phone but does not occur on a OnePlus phone, suggesting device-specific behavior.
Additional Information:
Could you please provide guidance or a fix for this issue? Any insights into why this might be happening on specific devices would be greatly appreciated.
Steps to Reproduce
The current behavior
The instances are displayed as fully black or grey images.
The expected behavior
The instances within the study should display correctly as they do on other devices, including a OnePlus phone and desktop browsers.
OS
Android 12
Node version
Browser
Chrome 126.0.6478.122
The text was updated successfully, but these errors were encountered: