itk-wasm icon indicating copy to clipboard operation
itk-wasm copied to clipboard

Can not use `readImageFile` (and `readImageDICOMFileSeries`) to read a DICOM file, while Glance can and itk-vtk-view also fails.

Open hxhxhx88 opened this issue 2 years ago • 0 comments

Hi. I am trying to open this file: CR-MONO1-10-chest.dcm.zip using the following code:

fetch("/dicom/test.dcm")
        .then((resp) => resp.blob())
        .then((blob) => {
            const f = new File([blob], "test.dcm", {
                type: "application/dicom",
            })
            readImageFile(null, f).then((result) => {
                console.log(result)
            })
        })

However, it fails with the following errors: Screenshot 2022-12-04 at 15 33 34

I also tried readImageDICOMFileSeries without good luck.

Then I tried itk-vtk-viewer and got the same error. However, when trying Glance, it can successfully open the image. I checked the source code of Glance, which seemed to call readImageDICOMFileSeries but looked like not the wasm version. Not sure if it is the wasm version that has this reading problem.

Any help will be appreciated!

hxhxhx88 avatar Dec 04 '22 14:12 hxhxhx88