InsightSoftwareConsortium / InsightSoftwareConsortium/ITK-Wasm

readImage[Local]DICOMFileSeries not working

Open
#434 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
235
Forks
61
Avg merge
4d 19h
Merged PRs (30d)
4

Description

I've tried using both `readImageDICOMFileSeries` and `readLocalImageDICOMFileSeries` and both fail for different reasons. I've been at this for hours on end trying to fix one of them, but with no luck.

I have a bit of a complex situation since I'm using electron with node support in the renderer, so I have a complicated environment that allows for both node and browser features, I'm not sure if that might be confusing itk or not.

### `readLocalImageDICOMFileSeries`
This one just fails to read the dicom files. It fails at the `canReadTestFile` call that is made on the first file of the series, which I can't debug what exactly is failing because it goes to the compiled web assembly. I've looked at the ITK source code to find that method, and as far as I can tell my DICOMs do have the demarcation at 128 in the file, and every other DICOM parsing tool I've used has no issue reading them. I can even use the `itk-vtk-viewer` in my browser to load the same file that is failing with this call, and it reads it and renders, so why is the different function it's using able to read it but not this one?

### `readImageDICOMFileSeries`
For this, I have the `ImageIOs` and `WebWorkers` directories being copied over as per the Webpack instructions, and the web worker seems to start, but then the web worker has an error while trying to load the wasm. The `...BindingWasm.js` file is loaded via a webpack dev server on localhost and then when that file runs, it tries to retrieve the binary `.wasm` file via node fs for some reason? This wouldn't be a problem since as I said I have node support in my electron renderer environment, but the file it tries to read is the path that should be appended to my dev server host, not any actual file path. I could understand how this might be a result of there being both node and browser elements in my environment and reusing the DICOM Series Reader stuff.

Any assistance you could offer would be great, feels like I've been hitting my head against a wall for the past couple days.

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.