Skip to content

Window Level Incorrect After Upgrade to Cornerstone 4.x (Image Overexposed on Initial Load) #2716

@Arun-kinsolutions

Description

@Arun-kinsolutions

Describe the Bug

After upgrading Cornerstone packages from v1.84.4 → v4.22.3, the initial window level (WL/WW) is no longer applied correctly, causing the image to appear overexposed (completely white) on first render.

This issue did not occur in the older version and appears to be a regression.

Steps to Reproduce

  1. Load a attached DICOM image.
  2. Observe the initial rendered image.
  3. Notice that the image appears overexposed.
  4. Adjust window level manually → image becomes normal.
  5. This issue occurs during the initial rendering phase.
  6. Possible causes:
  7. Missing or incorrectly applied DICOM tags (WindowCenter, WindowWidth)
  8. Improper VOI (Volume of Interest) initialization
  9. Incorrect scaling or default viewport settings

Example DICOM file for test

Sample Dicom Images.zip

The current behavior

  1. On initial load, the image appears fully white (overexposed).
  2. WL/WW values seem to be set too high or not initialized correctly.
  3. The issue occurs before any user interaction.
  4. After manually adjusting the window level, the image renders correctly.
Image Image

The expected behavior

  1. The image should render with appropriate default WL/WW values derived from DICOM metadata.
  2. No manual adjustment should be required for proper visualization.

System Information

{
  "@cornerstonejs/core": "^1.84.4",
  "@cornerstonejs/dicom-image-loader": "^1.84.4",
  "@cornerstonejs/streaming-image-volume-loader": "^1.84.4",
  "@cornerstonejs/tools": "^1.84.4"
}

Behavior:

  1. Images render correctly on initial load
  2. Proper WL/WW applied automatically
{
  "@cornerstonejs/core": "^4.22.3",
  "@cornerstonejs/dicom-image-loader": "^4.22.3",
  "@cornerstonejs/streaming-image-volume-loader": "^1.86.1",
  "@cornerstonejs/tools": "^4.22.3"
}

Behavior:

  1. Initial image is completely white (overexposed)
  2. WL/WW appears too high or not initialized
  3. Manual window adjustment fixes the image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions