itk-wasm
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.
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:
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!