Open malaterre opened 1 year ago
Same goes for the Windows Photo Viewer:
The 16-bit test images I have are displayed correctly with Windows Photo Viewer on Windows 11.
Can you attach the gray16.jls image to this issue. I can then check if I can reproduce the problem.
Here you go. I can decompress it just fine using either GDCM and/or DCMTK. Thanks !
The image will decompress fine. It's range is however very small: [0..1176]. The Windows display pipeline expects 16 bit grayscale images to use the full 16 bit range (0 .. 65535). In essence it will only use the 8 high bits of a 16 bits images. This causes Windows Photo Viewer to show a black rectangle.
Normally DICOM viewing software will compensate for this and use additional info from the .dcm file (display LUT, etc) to map the used grayscale values to the 256 values a normal RGB monitor can display.
I have extended the WIC Explore application, an application I normally use for testing, to have an option to normalize the histogram of the image and use the full range.
The primary purpose of a WIC codec is to decode the pixels and to create a WICBitmapSource object. The viewer is responsible for displaying the bitmap on the screen.
Normalization of 16 bit grayscale images could also be built into the codec. This would be a global setting, as there is no API for it. But it would allow standard Windows viewers (Photo viewer and the thumbnail generator ) to be able to generate "visible" images.
It's range is however very small: [0..1176].
Thanks for catching my misunderstanding Victor !
Maybe a bit off-topic, but is there any reason why you are not distributing the windows binaries of the wic* related projects ? WICExplorer seems to require a recent VS, so distributing the binaries would reach a wide audience.
Thanks !
From the main README it appears as if a 16bits would be displayed (at least low bits). On my system it is displayed as black:
Would it be possible to clarify the toplevel README ?