# How to convert dicom series to vti file using vtk.js

**URL:** https://discourse.vtk.org/t/how-to-convert-dicom-series-to-vti-file-using-vtk-js/3966
**Category:** Support
**Created:** [August 13, 2020, 10:49am UTC](https://discourse.vtk.org/t/how-to-convert-dicom-series-to-vti-file-using-vtk-js/3966 "2020-08-13T10:49:16Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![bang98.2016](https://discourse.vtk.org/user_avatar/discourse.vtk.org/bang98.2016/32/2159_2.png) [@bang98.2016](https://discourse.vtk.org/u/bang98.2016)
#### Post date: [August 13, 2020, 10:49am UTC](https://discourse.vtk.org/t/how-to-convert-dicom-series-to-vti-file-using-vtk-js/3966/1 "2020-08-13T10:49:16Z")

</div>

I’m using readDICOMSeries to read a series .dcm image, but it’s very slow to load 500 .dcm image on [https://kitware.github.io/itk-vtk-viewer/app/](https://kitware.github.io/itk-vtk-viewer/app/)  
So that I want to convert series .dcm image to .vti  
Thanks in advance for any help from everyone.

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [August 13, 2020, 6:57pm UTC](https://discourse.vtk.org/t/how-to-convert-dicom-series-to-vti-file-using-vtk-js/3966/2 "2020-08-13T18:57:32Z")

</div>

Did you try [ParaView](https://www.paraview.org/download/) to create that vti file?

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [August 14, 2020, 12:49am UTC](https://discourse.vtk.org/t/how-to-convert-dicom-series-to-vti-file-using-vtk-js/3966/3 "2020-08-14T00:49:47Z")

</div>

I’m not sure if .vti file can store image axis directions. A few years ago (when vtkImageData did not support orientation yet), it surely was not able to store it. Without knowing axis directions, you cannot convert between physical (LPS) \<-\> voxel (IJK) positions.

For medical images, I would recommend to use nrrd, metaimage, or nifti file format instead, which can all store image direction.

I’m not sure how robust ParaView’s DICOM importer is and if it supports image directions. It is probably a safer choice to use medical imaging applications, such as 3D Slicer, MITK, ITK-Snap, etc. to load the DICOM image and then save it in your preferred format.

---

<div class="post-metadata">

### Author: ![bang98.2016](https://discourse.vtk.org/user_avatar/discourse.vtk.org/bang98.2016/32/2159_2.png) [@bang98.2016](https://discourse.vtk.org/u/bang98.2016)
#### Post date: [August 14, 2020, 3:04am UTC](https://discourse.vtk.org/t/how-to-convert-dicom-series-to-vti-file-using-vtk-js/3966/4 "2020-08-14T03:04:20Z")

</div>

Thanks for your answer. I need convert step by step not tool. I need to resolve it.

---

<div class="post-metadata">

### Author: ![bang98.2016](https://discourse.vtk.org/user_avatar/discourse.vtk.org/bang98.2016/32/2159_2.png) [@bang98.2016](https://discourse.vtk.org/u/bang98.2016)
#### Post date: [August 14, 2020, 3:11am UTC](https://discourse.vtk.org/t/how-to-convert-dicom-series-to-vti-file-using-vtk-js/3966/5 "2020-08-14T03:11:31Z")

</div>

Thanks for your recommend to use nrrd. I’ll research for that. If you have any document, please send for me!!!

---

<div class="post-metadata">

### Author: ![Tran\_Phong](https://discourse.vtk.org/user_avatar/discourse.vtk.org/tran_phong/32/3749_2.png) [@Tran\_Phong](https://discourse.vtk.org/u/Tran_Phong)
#### Post date: [August 12, 2021, 10:40am UTC](https://discourse.vtk.org/t/how-to-convert-dicom-series-to-vti-file-using-vtk-js/3966/6 "2021-08-12T10:40:13Z")

</div>

Hi Sebastien,  
Do you have example of how to convert dcm to vti file using paraview / vtk ?

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [August 12, 2021, 4:33pm UTC](https://discourse.vtk.org/t/how-to-convert-dicom-series-to-vti-file-using-vtk-js/3966/7 "2021-08-12T16:33:21Z")

</div>

If ParaView works for you, load your file(s) and save it using the vti format. If you use the `trace` ParaView should give you the scripting equivalent to perform that operation so you could automate it later on using pvpython.

---

<div class="post-metadata">

### Author: ![Tran\_Phong](https://discourse.vtk.org/user_avatar/discourse.vtk.org/tran_phong/32/3749_2.png) [@Tran\_Phong](https://discourse.vtk.org/u/Tran_Phong)
#### Post date: [August 12, 2021, 6:26pm UTC](https://discourse.vtk.org/t/how-to-convert-dicom-series-to-vti-file-using-vtk-js/3966/8 "2021-08-12T18:26:37Z")

</div>

Hi Sebastien,  
I am not quite understanding how to run ParaView, I download Paraview from this page  
[https://www.paraview.org/download/](https://www.paraview.org/download/) .  
And binary files are located here. And I dont find any file to run Paraview application

> #( 08/13/21@ 1:23AM )( phongtd@nguyenth ):~/workingspace/ParaView-5.9.1-1476-gf2172c1-osmesa-MPI-Linux-Python3.9-x86\_64/bin  
> ll  
> total 4860  
> drwxr-xr-x 2 phongtd phongtd 4096 Thg 8 8 12:53 ./  
> drwxrwxr-x 5 phongtd phongtd 4096 Thg 8 9 10:06 …/  
> -rwxr-xr-x 1 phongtd phongtd 2204808 Thg 8 8 12:54 hydra\_pmi\_proxy\*  
> -rwxr-xr-x 1 phongtd phongtd 2476600 Thg 8 8 12:53 mpiexec\*  
> -rwxr-xr-x 1 phongtd phongtd 13328 Thg 8 8 12:52 ospray\_mpi\_worker\*  
> -rw-r–r-- 1 phongtd phongtd 49 Thg 8 8 12:46 paraview.conf  
> -rwxr-xr-x 1 phongtd phongtd 24848 Thg 8 8 12:52 pvbatch\*  
> -rwxr-xr-x 1 phongtd phongtd 25432 Thg 8 8 12:52 pvbatch-real\*  
> -rwxr-xr-x 1 phongtd phongtd 24848 Thg 8 8 12:52 pvdataserver\*  
> -rwxr-xr-x 1 phongtd phongtd 19216 Thg 8 8 12:52 pvdataserver-real\*  
> -rwxr-xr-x 1 phongtd phongtd 24848 Thg 8 8 12:52 pvpython\*  
> -rwxr-xr-x 1 phongtd phongtd 25432 Thg 8 8 12:52 pvpython-real\*  
> -rwxr-xr-x 1 phongtd phongtd 24848 Thg 8 8 12:52 pvrenderserver\*  
> -rwxr-xr-x 1 phongtd phongtd 19216 Thg 8 8 12:52 pvrenderserver-real\*  
> -rwxr-xr-x 1 phongtd phongtd 24848 Thg 8 8 12:52 pvserver\*  
> -rwxr-xr-x 1 phongtd phongtd 19208 Thg 8 8 12:52 pvserver-real\*

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [August 12, 2021, 7:26pm UTC](https://discourse.vtk.org/t/how-to-convert-dicom-series-to-vti-file-using-vtk-js/3966/9 "2021-08-12T19:26:27Z")

</div>

The ParaView that you’ve downloaded is for headless server with no GPU (slow rendering). So there is no Qt (desktop UI) client to start. You need to download the full package in the **ParaView** section rather than **ParaView Server for Headless Machines**.
