This repository provides the setup for an Orthanc server environment for testing purposes. It includes the necessary files and scripts to quickly build and run a local instance of Orthanc, as well as to generate fake DICOM images for testing.
- Orthanc Server Setup: Contains a
Dockerfileand pre-configured configuration file for building and running an Orthanc server instance. - Fake DICOM Generation: Includes a script to create fake DICOM files for testing purposes.
- DICOM Query and Retrieve Examples: Demonstrates how to use the
findscuandmovescutools from the DCMTK suite to interact with the Orthanc server.
- Docker: Ensure Docker is installed and running on your system.
- DCMTK Suite:
findscuandmovescutools should be installed. You can download them from the DCMTK official site.- DCMTK Version: This repository has been tested with
$dcmtk: dcmdump v3.6.8 2023-12-19 $.
- DCMTK Version: This repository has been tested with
- Pydicom: This repository has been tested with
pydicomversion 2.4.4.
- Run the Orthanc container using Docker Compose:
docker-compose up -d
After the Orthanc server is up and running, generate and store fake DICOM files using the provided scripts:
-
Generate Fake DICOMs:
./scripts/create_dummy_dicoms.py
-
Upload Fake DICOMs to Orthanc:
./scripts/upload_dicoms.sh
The findscu tool is used to perform a C-FIND operation to query the Orthanc server for specific DICOM studies. Below is an example command to query for studies using a StudyInstanceUID:
findscu -v -S -k QueryRetrieveLevel=STUDY -k StudyInstanceUID=8 -k PatientName -aet FAKE_AET -aec ORTHANC localhost 4242-v: Verbose mode to display detailed processing information. You can use-dinstead for more logs.-S: Use Study Root information model.-k: Specifies DICOM query keys (e.g.,QueryRetrieveLevel,StudyInstanceUID,PatientName).-aet FAKE_AET: Sets the calling AE title.-aec ORTHANC: Sets the called AE title (the AE title of the Orthanc server).localhost 4242: Address and port where the Orthanc server is running.
The movescu tool is used to perform a C-MOVE operation to retrieve DICOM images from the Orthanc server. Here’s an example command:
movescu -v -aet FAKE_AET -aec ORTHANC -aem FAKE_AET -k StudyInstanceUID=5 --store --store-port 4243 --output-directory . localhost 4242-v: Verbose mode to display detailed processing information. You can use-dinstead for more logs.-aet FAKE_AET: Sets the calling AE title.-aec ORTHANC: Sets the called AE title (the AE title of the Orthanc server).-aem FAKE_AET: Sets the move destination AE title (the AE title that Orthanc sends images to).-k StudyInstanceUID=...: Specifies the DICOM query key for StudyInstanceUID.--store: Initiates the storage SCP function to receive data.--store-port 4243: Port on which the SCU will listen to receive data.--output-directory .: Directory to store the received DICOM files.localhost 4242: Address and port of the Orthanc server.
- Ensure that the AE titles and ports are correctly configured in your Orthanc configuration file at
DicomModalitiesto match those used in thefindscuandmovescucommands.
---
This README provides a comprehensive overview and step-by-step instructions for setting up and using an Orthanc server for DICOM testing. If you encounter any issues, refer to the Orthanc and DCMTK documentation for additional guidance.