Skip to content

Docker Container

margdking edited this page Aug 22, 2024 · 1 revision

DICOM Receiver Tool

The DICOM Receiver is a specialized tool designed to facilitate the seamless integration of MRI data into a comprehensive data management system. Its primary function is to receive DICOM images organized by series for individual studies, and save the image files.

Once the images are saved, the tool performs data validation by cross-referencing key metadata—such as study identifiers, scanner details, series information, and patient URSI/ID—against the COINS database. This ensures the accuracy and consistency of the data before it is entered into the database.

After successful validation, the tool automatically logs the series data into the COINS database. Finally, it uploads the validated series to an Amazon S3 bucket for secure storage and easy accessibility, ensuring efficient data management and retrieval. This comprehensive process streamlines the handling of DICOM images from initial receipt to final storage, maintaining data integrity and facilitating robust research and analysis.

How to Run the DICOM Receiver

1. Login to Docker CLI

Use the following command to login to the Docker CLI:

docker login -u coinstrends

At the password prompt enter the personal access token. Please request this access token from the COINS team.

2. Prepare storescu

Ensure you have Dockerfile.storescu. storescu is a command-line utility used to send DICOM images and related data from a local system to a remote DICOM-compliant Picture Archiving and Communication System (PACS), DICOM server, or another DICOM node. Run the following command from the location where Dockerfile.storescu is located:

docker build -t storescu -f utils/Dockerfile.storescu ./

3. Pull the Latest DICOM Receiver Image

Use the command below to pull the latest image of the DICOM Receiver tool from DockerHub:

docker pull trendscenter/coins-dicom-receiver:latest

4. Run the DICOM Receiver

Once the image is pulled, use the following command to run the image:

docker run \
  -v $RECEIVER_HOME/dicom_receiver.env:/home/coins/dicom-receiver/utilities/dicom_receiver.env \
  -v $RECEIVER_HOME/received_images:/home/coins/received_images \
  -v $RECEIVER_HOME/validated_images:/home/coins/validated_images \
  -v $RECEIVER_HOME/lost+found:/home/coins/lost+found \
  -v $RECEIVER_HOME/logs:/home/coins/logs \
  -p 4448:5000 trendscenter/coins-dicom-receiver:0.0.1

Here, $RECEIVER_HOME is the location on your local filesystem. Replace $RECEIVER_HOME in the command with the path where the folders received_images, validated_images, lost+found, logs, and the environment file dicom-receiver.env are located. Alternatively, set $RECEIVER_HOME using one of the commands below based on your operating system:

a. For Windows:

set RECEIVER_HOME=C://path/to/folder

b. For macOS and Linux:

export RECEIVER_HOME=/path/to/folder

5. Run storescu to send images

Using below docker run command, run the storescu (image built in step 2) to send images

docker run -v /path/where/the/images/are/:/home/coins/dicom/data/ storescu \
-c COINSDCMRCV@host.docker.internal:4448 \
/home/coins/dicom/data/

Here, /home/coins/dicom/data/ represents the directory where you want to mount the files from your local filesystem to the container filesystem.

For any queries or suggestions, please contact coinsdev@trendscenter.org.