OHIF / Viewers

OHIF zero-footprint DICOM viewer and oncology specific Lesion Tracker, plus shared extension packages
https://docs.ohif.org/
MIT License
2.99k stars 3.14k forks source link

[Bug] US - Blank Images and throws 'Error: The image does not have a complete color palette. R, G, and B palette data are required.' #4218

Open tirta-ir opened 3 weeks ago

tirta-ir commented 3 weeks ago

Describe the Bug

Hi, I am still encountering the same error as in my previous issue #4075. My US (multi-frame) DICOM images with PALETTE COLOR photometric interpretation still cannot be viewed, even though I am using the latest master branch version (3.9.38) as you said it was fixed in dev.

Steps to Reproduce

  1. Download the exported Ultrasound (US) DICOM images from this link (https://drive.google.com/file/d/17xuICqMgf5v4cosGWRuNlt7R9n4Kq8aS/view?usp=sharing).
  2. Upload the DICOM images to OHIF using the latest master branch version (3.9.38).
  3. View the DICOM images using the basic viewer.

The current behavior

The cornerstone in the basic viewer still returns a blank screen. For example, when using the version 3.9.38, it throws this error.

image

fetchPaletteColorLookupTableData.js:70 
 No data found for [object ArrayBuffer] palette
convertPALETTECOLOR.ts:59 
 Uncaught (in promise) 

Error: The image does not have a complete color palette. R, G, and B palette data are required.
    at convertPALETTECOLOR.ts:59:13
DataArray.js:518 
 Uncaught (in promise) 

RangeError: model.size is not a multiple of model.numberOfComponents
    at p (DataArray.js:518:11)
    at Object.n [as newInstance] (macros2.js:917:5)
    at ue.createVTKImageData (StackViewport.ts:1659:25)
    at ue._createVTKImageData (StackViewport.ts:1690:28)
    at ue._updateActorToDisplayImageId (StackViewport.ts:2352:10)
    at ue.renderImageObject (StackViewport.ts:2171:14)
    at renderToCanvasGPU.ts:178:36
    at new Promise (<anonymous>)
    at oe (renderToCanvasGPU.ts:101:10)
    at u (loadImageToCanvas.ts:146:7)

The expected behavior

The DICOM should be displayed like this (OHIFv2 or other DICOM viewers like the MedDream demo).

OHIFv2 Viewer image

MedDream Viewer image

OS

Ubuntu 22.04.3 LTS

Node version

20.12.2

Browser

Chrome 123.0.6312.122 (Official Build) (64-bit)

sedghi commented 3 weeks ago

So i will close the other issue since you opened a new one

tirta-ir commented 2 weeks ago

I got additional information for this issue. It might be that the issue is related to how OHIF or Cornerstone interprets the Palette Color metadata. The LUT handling isn't correctly implemented, resulting in a blank screen.

I attempted to reproduce the issue using another ultrasound image from [these sample], which also uses palette color interpretation for US images, and encountered the same blank screen.

However, when I converted the DICOM file using my Python script to YBR then opened it on OHIF, it displayed correctly.