-
Notifications
You must be signed in to change notification settings - Fork 302
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
Not all colors are displayed correctly in DICOM PR graphics #143
Comments
This explanation does not allow me to draw any conclusions. If you are waiting for an answer, you should provide a more precise explanation about the DICOM attributes or an example file. |
I will attach a zip with |
You store RGB value into an attribute requiring a CIELab Value |
Thank you very much for your answer. Based on it I wrote an RGB to CIELab converter. The source code is attached to my answer. Firstly, this class converts an RGB value to a CIELab value. Then L, a, and b values are linearly scaled to 16 bits as the standard requires. The results are as follows: Color Blue Black Yellow White Red Orange Using this thing, for example, http://colorizer.org/ you can control that produced CIELab values are correct. Produced DICOM images are located in the attached ZIP. So, Weasis shows something very different from the original image. ToCieLabConverter.txt It seems that Weasis expects more likely RGB values but not always reads them correctly. |
Thank you for your cooperation! |
Describe the bug
I am working on a piece of software that generates DICOM Color Softcopy Presentation State files. I am testing produced CSPS files using the Weasis viewer. Everything works fine. However, some colors are distorted. Green (0,128,0), blue (0,0,255), black (0,0,0) color is displayed correctly. Yellow (255,255,0) is changed to light green (~99,255,0), white (255,255,255) - to light blue (~99,255,255), red (255,0,0) - to dark red (~99,0,0), orange (255,165,0) - to light green (~99,165,0). As you can see, the problem is with the red channel. Its value is multiplied by approximately 0,38, regardless of concrete value (I have tested different values). I am not able to figure out problems with our software.
Desktop (please complete the following information):
Screenshots

Original image
The result displayed with Weasis

The text was updated successfully, but these errors were encountered: