# Loading DICOM volume got significantly slower

**URL:** https://discourse.slicer.org/t/loading-dicom-volume-got-significantly-slower/9605
**Category:** Support
**Created:** [December 24, 2019, 10:39am UTC](https://discourse.slicer.org/t/loading-dicom-volume-got-significantly-slower/9605 "2019-12-24T10:39:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)
#### Post date: [December 24, 2019, 10:39am UTC](https://discourse.slicer.org/t/loading-dicom-volume-got-significantly-slower/9605/1 "2019-12-24T10:39:24Z")

</div>

Here are the logs when loading the same DICOM volume with the ‘Add data’ menu on Linux :

On 2019-11-11 (don’t know the revision tag) :

```
 There is more than one file, use the vtkITKArchetypeImageSeriesReader instead
Loaded volume from file: /home/user/tmp/mscans/fsg_2019-10-23/images/pat00000/st000000/se000000/ct000027. Dimensions: 512x512x2167. Number of components: 1. Pixel type: int.
"Volume" Reader has successfully read the file "/home/user/tmp/mscans/fsg_2019-10-23/images/pat00000/st000000/se000000/ct000027" "[89.89s]"

```

Today 2019-12-24 (6e48df6) :

```
There is more than one file, use the vtkITKArchetypeImageSeriesReader instead
Loaded volume from file: /home/user/tmp/mscans/fsg_2019-10-23/images/pat00000/st000000/se000000/ct000027. Dimensions: 512x512x2167. Number of components: 1. Pixel type: int.
"Volume" Reader has successfully read the file "/home/user/tmp/mscans/fsg_2019-10-23/images/pat00000/st000000/se000000/ct000027" "[389.11s]"

```

That’s 5 minutes more, and 4.4 times slower.

Loaded the same volume with the DICOM module : time parameter is not logged, I would say about 5 minutes.

```
Switch to module: "DICOM"
QXcbConnection: XCB error: 3 (BadWindow), sequence: 8822, resource id: 42099390, major code: 40 (TranslateCoords), minor code: 0
"DICOM indexer has successfully inserted 2167 files [2.38s]"
"DICOM indexer has successfully processed 2167 files [6.13s]"
"DICOM indexer has updated display fields for 2167 files [0.66s]"
Imported a DICOM directory, checking for extensions
Loading with imageIOName: GDCM
Window/level found in DICOM tags (center=40.0, width=400.0) has been applied to volume 2: Aorte Membre Inf

```

Can it be improved ?

Thanks.

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [December 24, 2019, 2:01pm UTC](https://discourse.slicer.org/t/loading-dicom-volume-got-significantly-slower/9605/2 "2019-12-24T14:01:47Z")

</div>

I don’t see any difference between DICOM loading speed between Slicer-2019-11-03 and Slicer-2019-12-19 versions on Windows when using Add data module (a CT consisting of 2600 files, 340MB in total in 22-23sec). I don’t see any code change in this time period that could affect DICOM loading speed.

- Have you repeated the measurements several times? First loading of a file after may be much slower than loading the file again.
- What kind of series you are reading? What device generated it (manufacturer, model, year)? What is the total size of the series?
- Did you build Slicer with the same optimization options?
- Could you try the official build Slicer builds (you can download them by specifying “offset” value for the download page, for example [https://download.slicer.org/?offset=-30](https://download.slicer.org/?offset=-30)).
- Can you try more Slicer versions to find the exact version number between 2019-11-11 and 2019-12-24 to check where exactly you start to see the difference?

---

<div class="post-metadata">

### Author: ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)
#### Post date: [December 24, 2019, 6:09pm UTC](https://discourse.slicer.org/t/loading-dicom-volume-got-significantly-slower/9605/3 "2019-12-24T18:09:06Z")

</div>

After a few tests, I think the problem is related to fuse on that particular machine.

I tried a 512x512x1935 volume on another machine, my laptop. I usually copy the image of CT angioscan DVDs as an ISO file, then mount these with fuseiso. The load time is ‘normal’ on my laptop :

ISO mounted with fuseiso : 68 secs (evaluated twice)  
ISO mounted as root : 9 seconds  
DICOM files copied in a directory on disk from the ISO : 8 seconds

During the loading, fuseiso consumes about 70% of 1 CPU core, while on my work PC where loading got slow, fuseiso consumes about 95% of 1 CPU core.

Using 6e48df6 here.

I’ll perform further tests on the problematic PC ASAP.

Thanks.
