10.2. Clara DICOM Writer
The DICOM Writer is a post-processor that converts an MHD file into DICOM files.
Each MHD file is converted into a series of DICOM files, which are output to a specified directory.
Each DICOM file is named with an auto-generated UID. Each MHD file should be named after the Series
Instance UID associated with its original DICOM series (e.g. 1.2.826.0.1.3680043.2.1125.1.30521143073416610365663301213782755.mhd
). The output directory is subsequently consumed by the Clara DICOM Adapter.
Docker
Before running the container, use docker pull
to ensure an up-to-date image is installed. Once
the pull is complete, you can run the container image as part of a pipeline.
In the
Tags
section, locate the container image release that you want to run.In the
PULL TAG
column in the table, click the icon to copy thedocker pull
command.Open a command prompt and paste the pull command. Ensure the pull completes successfully before proceeding to the next step.
Use the following command to create
dicom
,mhd
, andoutput
folders for mounting the container:mkdir -p dicom mhd output
Copy DICOM files to the
dicom
folder and MHD files to themhd
folder with the following commands:# Copy DICOM files to the DICOM folder cp -r /path/to/dicom/files dicom # Copy mhd files to the mhd folder cp -r /path/to/mhd/files mhd
The DICOM Writer will convert MHD files in the
mhd
folder to DICOM files in theoutput
folder using headers from the DICOM files in thedicom
folder.Use the the following commands to run the DICOM Writer with the
dicom
,mhd
andoutput
directories:docker run -it --rm \ -e NVIDIA_CLARA_NOSYNCLOCK=TRUE \ -e NVIDIA_CLARA_JOBID="692f5d9e2c974e4b87e87dc9bfacf5b2" \ -e NVIDIA_CLARA_JOBNAME="test-dicom-write" \ -e NVIDIA_CLARA_STAGENAME="io" \ -e NVIDIA_CLARA_INPUT="/payload/mhd" \ -e NVIDIA_CLARA_DCM="/payload/dicom" \ -e NVIDIA_CLARA_OUTPUT="/payload/output" \ -v `pwd`/dicom:/payload/dicom \ -v `pwd`/mhd:/payload/mhd \ -v `pwd`/output:/payload/output \ dicom-writer:latest
The above image tag is set to latest
. Replace latest
with the image tag used in step 1.