# DICOM network retrieval from PACS - automated approach possible?

**URL:** <https://discourse.slicer.org/t/dicom-network-retrieval-from-pacs-automated-approach-possible/4780>\
**Category:** Support\
**Tags:** dicombrowser, dicom, networking\
**Created:** [November 17, 2018, 11:20am UTC](https://discourse.slicer.org/t/dicom-network-retrieval-from-pacs-automated-approach-possible/4780 "2018-11-17T11:20:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandor\_Konya](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@Sandor\_Konya](https://discourse.slicer.org/u/Sandor_Konya)\
**Post date:** [November 17, 2018, 11:20am UTC](https://discourse.slicer.org/t/dicom-network-retrieval-from-pacs-automated-approach-possible/4780/1 "2018-11-17T11:20:21Z")

</div>

Hi there,

i’ve managed to set up a PACS server connection in Slicer, image retrieval is w/o problem, listener listens and gets/stores images, they show up in local DICOM storage. So far so good, but i would like to “download” a series of thousands of images (i have patient IDs/ image IDs in .CSV file)

A, Is it possible to script the data retrieval with Python, so that i can retrieve without manually entering any data on the DICOM Query dialog interface ([this](https://www.slicer.org/wiki/File:Form_224.png))

B, if not, is it possible to add more options to the DICOM Query dialog interface (like more modalities DX,EC etc. is missing)

EDIT:  
i found [this post](https://discourse.slicer.org/t/dicom-pacs-does-retrieve-but-series-do-not-show-in-browser/2012/2), based on it, what i need is to call external commands… do i?

thank you in advance,  
regards  
Sandor

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [November 17, 2018, 1:31pm UTC](https://discourse.slicer.org/t/dicom-network-retrieval-from-pacs-automated-approach-possible/4780/2 "2018-11-17T13:31:31Z")

</div>

Hi Sandor -

It’s great that this is working via the GUI. For scripting, it’s probably easiest to just use the [dcmtk command line utilities](https://dicom.offis.de/dcmtk.php.en) directly. If you look in the slicer log you will see the command line options used for `storescp` that runs the listener.

HTH,  
Steve

---

<div class="post-metadata">

**Author:** ![Sandor\_Konya](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@Sandor\_Konya](https://discourse.slicer.org/u/Sandor_Konya)\
**Post date:** [November 18, 2018, 6:00pm UTC](https://discourse.slicer.org/t/dicom-network-retrieval-from-pacs-automated-approach-possible/4780/3 "2018-11-18T18:00:04Z")

</div>

Hi Steve,

thank you for the tip, i managed to retrieve the pictures with dcmtk command line utilities (after realizing that the findscu and echoscu executables are not in the Slicer3D install).

In the meanwhile i explored the source code of Slicer3D and i’ll post another, but dev. question you definitely are able to help with.

thank you,  
Sandor
