InsightSoftwareConsortium / InsightSoftwareConsortium/ITK-Wasm

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

Open
#698 0 comments 1 reaction 0 assignees View on GitHub
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:
Screenshot 2022-12-04 at 15 33 34

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.