cornerstone3D
cornerstone3D copied to clipboard
[Bug] After using compression, DICOM files rendereed as brighter
Describe the Bug
As discussed during the office hours on July 4th, I am raising this issue for further investigation. Here is the background information regarding the issue. Please take a look at the anonymized DICOM file, which includes both the original and compressed versions.
We have converted the DICOM file to the compression format/transfer syntax using dmctk to "1.2.840.10008.1.2.4.51", which is the "JPEG Baseline (Processes 2 & 4): Default Transfer Syntax for Lossy JPEG 12-bit Image Compression (Process 4 only)." However, when the image is loaded onto the CS3D viewport, it appears much brighter, as if the window level has been changed. Upon checking the metadata, there are no indications of such changes. Further investigation revealed that the image has different RescaleSlope and RescaleIntercept metadata values. Interestingly, the image appears normal when viewed on the Weasis viewer. Also, i am using the WadoURI loader to load images from the locally hosted server via HTTP
Here are the different images viewed on OHIF and Weasis viewer
Attaching originals and compressed zip compressed.zip original.zip
Steps to Reproduce
I used dcmtk tool to compress the DICOM with the following command
dcmcjpeg +ee +q 100 +sm 100 <input-file> <output-file>
Loaded image onto OHIF and Weassis to re-produce the issue
The current behavior
Image is appearing to be brighter as mentioned in above screenshot
The expected behavior
Image to be not bright and should look like viewed in Weasis in screenshot earlier
OS
macOS
Node version
None
Browser
Safari 17.5, Chrome Version 126.0.6478.127 (Official Build) (arm64)