# Need help in resolving the error in "readImageDICOMFileSeries"

**URL:** https://discourse.itk.org/t/need-help-in-resolving-the-error-in-readimagedicomfileseries/5561
**Category:** Beginner Questions
**Tags:** itk-js, itk-wasm
**Created:** [December 9, 2022, 11:05am UTC](https://discourse.itk.org/t/need-help-in-resolving-the-error-in-readimagedicomfileseries/5561 "2022-12-09T11:05:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![shantanudeo](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/7ea924/32.png) [@shantanudeo](https://discourse.itk.org/u/shantanudeo)
#### Post date: [December 9, 2022, 11:05am UTC](https://discourse.itk.org/t/need-help-in-resolving-the-error-in-readimagedicomfileseries/5561/1 "2022-12-09T11:05:34Z")

</div>

Firstly, I am new to ITK-wasm and even JS.  
I am trying out an example to read DICOM image using ITK.js.  
I have followed “itk-read-dicom” on Glitch ([https://glitch.com/edit/#!/itk-read-dicom?path=src%2Findex.js%3A27%3A37](https://glitch.com/edit/#!/itk-read-dicom?path=src%2Findex.js%3A27%3A37)), but I am still getting an error when reading multiple DICOM images (reading a single image works fine).

I then modified the code a bit, as per my understanding; but, still getting an error.  
Below is the code.

```auto
          return readImageDICOMFileSeries(files, true)
            .then(function({image, webWorkerPool}) {
              webWorkerPool.terminateWorkers();
              printImage(image);
            })
            .catch((error) => {
              console.log(`Error: ${error}`);
            });

```

Below is the error I am getting…

`Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'terminate')`

Thanks in advance! Please let me know if more information is required.
