# Detect DICOM series inside client's folder from vtk.js running on browser

**URL:** https://discourse.vtk.org/t/detect-dicom-series-inside-clients-folder-from-vtk-js-running-on-browser/7148
**Category:** Web
**Created:** [November 11, 2021, 10:07am UTC](https://discourse.vtk.org/t/detect-dicom-series-inside-clients-folder-from-vtk-js-running-on-browser/7148 "2021-11-11T10:07:37Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Simone](https://discourse.vtk.org/user_avatar/discourse.vtk.org/simone/32/4249_2.png) [@Simone](https://discourse.vtk.org/u/Simone)
#### Post date: [November 11, 2021, 10:07am UTC](https://discourse.vtk.org/t/detect-dicom-series-inside-clients-folder-from-vtk-js-running-on-browser/7148/1 "2021-11-11T10:07:37Z")

</div>

Hi Everyone,  
I’m trying to develop a browser side js that can read a folder (chosen by the user) and detect/regroup all the dicom series in it. Is it possible in vtk.js? I know that in standard vtk library this could be achieved using vtkDICOMDirectory, while this function is missing in vtk.js.

Thanks in advance, any help would be appreciated.

---

<div class="post-metadata">

### Author: ![Forrest](https://discourse.vtk.org/user_avatar/discourse.vtk.org/forrest/32/300_2.png) [@Forrest](https://discourse.vtk.org/u/Forrest)
#### Post date: [November 11, 2021, 3:11pm UTC](https://discourse.vtk.org/t/detect-dicom-series-inside-clients-folder-from-vtk-js-running-on-browser/7148/2 "2021-11-11T15:11:03Z")

</div>

Hi, you can use [itk.js](https://github.com/InsightSoftwareConsortium/itk-js/) to read in the DICOM into vtk.js. Check out the itk.js documentation to get more info on what you want to achieve.

---

<div class="post-metadata">

### Author: ![Simone](https://discourse.vtk.org/user_avatar/discourse.vtk.org/simone/32/4249_2.png) [@Simone](https://discourse.vtk.org/u/Simone)
#### Post date: [November 12, 2021, 10:20am UTC](https://discourse.vtk.org/t/detect-dicom-series-inside-clients-folder-from-vtk-js-running-on-browser/7148/3 "2021-11-12T10:20:25Z")

</div>

Thank you!  
Do you also know if using itk.js/vtk.js i could achieve anonymization/deidentification?

---

<div class="post-metadata">

### Author: ![pieper](https://discourse.vtk.org/user_avatar/discourse.vtk.org/pieper/32/17_2.png) [@pieper](https://discourse.vtk.org/u/pieper)
#### Post date: [November 12, 2021, 3:06pm UTC](https://discourse.vtk.org/t/detect-dicom-series-inside-clients-folder-from-vtk-js-running-on-browser/7148/4 "2021-11-12T15:06:04Z")

</div>

You could have a look at this project:

> **[GitHub - jmhmd/dicom-browser-anonymize: Proof of concept DICOM decompress and...](https://github.com/jmhmd/dicom-browser-anonymize)**
>
> Proof of concept DICOM decompress and anonymize in browser, writing new P10 file - GitHub - jmhmd/dicom-browser-anonymize: Proof of concept DICOM decompress and anonymize in browser, writing new P1...

---

<div class="post-metadata">

### Author: ![rajajms](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rajajms/32/7476_2.png) [@rajajms](https://discourse.vtk.org/u/rajajms)
#### Post date: [July 19, 2023, 11:41am UTC](https://discourse.vtk.org/t/detect-dicom-series-inside-clients-folder-from-vtk-js-running-on-browser/7148/5 "2023-07-19T11:41:08Z")

</div>

Though your question is different, but if you want to load and perse dicom images

```auto
async function handleFile(event) {
    const files = event.target.files;
    const { image, webWorker } = await window.itk.readImageDICOMFileSeries(files, false);
    webWorker.terminate();
    const vtkImage = vtkITKHelper.convertItkToVtkImage(image);
}

const dicomFileInput = document.getElementById('dicomFileInput');
dicomFileInput.addEventListener('change', handleFile);

```

make sure to import ITKHelper as below and also itk-wasm  
`import vtkITKHelper from '@kitware/vtk.js/Common/DataModel/ITKHelper';`
