-
Notifications
You must be signed in to change notification settings - Fork 285
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
8-bit colored images are not displayed properly #338
Comments
This is an anonymized dataset that reproduces the issue: https://1drv.ms/u/s!AluyBah_ueAcg8EHRae6kDbLtkR5sA?e=c3kRnR I checked the cornerstone3d example and it configures cornerstoneWADOImageLoader as recommended in this issue cornerstonejs/cornerstoneWADOImageLoader#498: cornerstoneWADOImageLoader.configure({
useWebWorkers: true,
decodeConfig: {
convertFloatPixelDataToInt: false,
},
}); |
I was able to track down the corrupted display in:
to the StackViewport useRGBA flag here: Once I set the useRGBA to true, the image is rendered to match the way it is rendered in point 2:
@sedghi any idea what could be the problem with RGB <--> RGBA? The invalid W/L seems to be carried over from old cornerstone as I can reproduce it there. |
As I see the desktop and webgl path matches each other, no? I don't understand So you are saying the failed CPU path is corrected if useRGBA is true right? I guess that is a bug and it should use flag as true (which I thought it is true by default), since CPU webgl uses the A (in rgbA) to render greyscale so it need the useRGBA |
@sedghi , I can create a PR and flip the flag to I need to take better screenshots and show better example for the off W/L between the desktop and cornerstone , I'll create a separate issue for it and we'll focus in this issue on the rgba problem |
I'm 99.99% sure that was a mistake by me adding useRGBA to false for CPU route. |
When using wado-uri or file system to load an ultrasound 8-bit image with with "Photometric Interpretation (0028,0004)" "RGB" and "Samples Per Pixel (0028,0002)" "3" the image rendering is corrupted.
There are different rendering results using CPU or WebGL, You can try this in the Examples:
CPU Example Result:
WebGL Example Result:
Desktop Viewer (notice the non-organ part is black):
The text was updated successfully, but these errors were encountered: