InsightSoftwareConsortium / InsightSoftwareConsortium/ITK-Wasm
Can not use `readImageFile` (and `readImageDICOMFileSeries`) to read a DICOM file, while Glance can and itk-vtk-view also fails.
- Dominant language
- Python
- Stars
- 235
- Forks
- 61
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 4
Description
Hi. I am trying to open this file: [CR-MONO1-10-chest.dcm.zip](https://github.com/InsightSoftwareConsortium/itk-wasm/files/10148761/CR-MONO1-10-chest.dcm.zip) using the following code:
```typescript
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](https://github.com/kitware/itk-vtk-viewer) and got the same error. However, when trying [Glance](https://kitware.github.io/glance/app/), it can successfully open the image. I checked [the source code of Glance](https://github.com/Kitware/glance/blob/master/externals/ITKReader/ITKDicomImageReader.js#L33), 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!
Contributor guide
Assessment
This issue has not been assessed yet.