polyseminar

Home / Video labs / CIIP

Send DICOM to a PACS

Orthanc plays the PACS and the DCMTK command-line tools play the scanner. You test the connection with C-ECHO, send 422 images with C-STORE, and check that they arrived.

Playing loads the video from YouTube, which then receives your IP address and may store data on your device. See the privacy notice, or watch on YouTube.

Get the lab files on GitHub →

Published

Never load real patient data, including your own scans, and never point these tools at a hospital system without permission.

What you will do

  • Name the four settings a DICOM connection needs, and say which belong to the network and which to DICOM.
  • Test a connection with echoscu and read its output.
  • Send a whole study with storescu, one image per request.
  • Run the same test with DCMTK installed on your own computer.

What you need

  • Docker: Docker Desktop on Windows 11 or macOS, or Docker Engine with the Compose plugin on Linux. Docker Desktop is free for personal use, education, and small businesses, and larger organizations need a paid subscription, so ask your IT team before you install it on a work computer.
  • At least 8 GB of RAM and about 4 GB of free disk space.

The four connection settings

A real scanner's DICOM settings have the same four fields. Many hospitals use port 104 or 11112. Here the PACS accepts any AE title, while a hospital PACS usually accepts images only from AE titles it knows.

SettingIn this labLayer
Calling AE title, the scannerCT_LAB, or any name up to 16 charactersDICOM
Called AE title, the PACSORTHANCDICOM
Hostpacs inside Docker, localhost from your own computerNetwork
Port4242Network

Test the connection with C-ECHO

Run echoscu

-aet is the calling AE title and -aec the called one, followed by the host and the port.

docker compose run --rm dcmtk echoscu -v -aet CT_LAB -aec ORTHANC pacs 4242
Received Echo Response (Success)
Releasing Association

Send the study with C-STORE

Run storescu

+sd scans the folder and +r goes into its subfolders. Each image is one request, so the run ends at request 422.

docker compose run --rm dcmtk storescu -v -aet CT_LAB -aec ORTHANC +sd +r pacs 4242 PAN_03
Sending Store Request (MsgID 422, CT)
Received Store Response (Success)
Releasing Association

Refresh http://localhost:8042. The study list shows two studies for patient PAN_03.

DCMTK on your own computer

Download DCMTK from the DCMTK tools page on Windows, run brew install dcmtk on macOS, or run sudo apt install dcmtk on Debian and Ubuntu. From your own computer the host is localhost:

Test the lab from your own computer

echoscu -v -aet CT_LAB -aec ORTHANC localhost 4242

If it doesn't work

What you seeWhat to do
cannot access file: PAN_03 from storescuDownload the study first, with docker compose run --rm download.
port is already allocatedAnother program uses port 8042 or 4242, often the PACS from the first lab. Run docker compose down in that lab's folder.
no configuration file provided: not foundThe terminal is not in the lab folder. Open it in the folder with compose.yaml.
Cannot connect to the Docker daemonStart Docker Desktop and wait until the engine is running. On Linux, start the Docker service.

Next lab: DICOM store errors and their fixes →

Sources: DCMTK; Orthanc; The current DICOM standard; Chen, L., et al. (2022). CTpred-Sunitinib-panNET. The Cancer Imaging Archive; Docker Desktop license terms. Polyseminar is an independent publisher. See the independence notice.