Problem about the Itk.js readImageDICOMFileSeries function

Hello folks. I have been learning itk.js for several days. I have a problem about the readImageDICOMFileSeries function. Here are some codes I wrote to read a DICOM file series as an itk.js Image object.

const files = document.getElementById('file').files;
readImageDICOMFileSeries(null, files)
            const {image}=worker;

Well, it worked fine for some dcm files. However, when I tried some files from another hospital, it just throw exceptions like this

"Could not read file: /work/4970_0001_259881493.dcm"
"Error: Could not read file: /work/4970_0001_259881493.dcm↵    at readImageEmscriptenFSDICOMFileSeries (http://localhost:8080/itk/WebWorkers/ImageIO.worker.js:57:356)↵    at readDICOMImageSeries (http://localhost:8080/itk/WebWorkers/ImageIO.worker.js:30:3933)↵    at http://localhost:8080/itk/WebWorkers/ImageIO.worker.js:30:4284↵    at i (http://localhost:8080/itk/WebWorkers/ImageIO.worker.js:2:2049)↵    at o (http://localhost:8080/itk/WebWorkers/ImageIO.worker.js:2:1874)↵    at http://localhost:8080/itk/WebWorkers/ImageIO.worker.js:2:2423"

Are there any incompatibility problems in the itk.js library?

Hi Mason,

Is this file part of the same series?

To find more information, try loading the data with 3D Slicer, dcmdump or gdcmdump.

Hope this helps,

This file is the first file of the series. And this series can be loaded in other softwares correctly. I have tried several series from the same hospital and they could not work using this code neither.

The names of these files contained some Chinese characters at first. The program came across some UTF-8 and UTF-16 issues. I thought Chinese characters were not be allowed so I changed the file names. Could this be the reason to lead to this error?

It may be that the DICOM files contain Chinese characters, and these are currently causing issues because we are not currently building DCMTK with ICU support in itk.js, which is used for character conversion.

To address this, we should find a file that exhibits the behavior that we can use in a regression test, and enable libiconv or icu support within the DCMTK build.

Thanks, Matt.