13.1.2. Setup

13.1.2.1. Install Clara DICOM Adapter Helm Chart

Navigate to NVIDIA NGC and follow the instructions to install Clara CLI first and use Clara CLI to fetch Clara DICOM Adapter helm chart.

13.1.2.2. Running the Clara DICOM Adapter

Before running the container, remove any existing installation and ensure an up-to-date image is installed.

13.1.2.3. Configuration

The DICOM Adapter configuration is a YAML-formatted file (app.yaml). It contains the following sections:

  • dicom

    • scp: DICOM SCP Service settings

    • scu: DICOM SCU service settings

  • pipeline-mappings: Pipeline mappings that map Clara AE Titles to pipelines

The Clara DICOM Adapter allows multiple Clara AE Titles to be configured so that each AE Title is mapped to a pipeline with a single DICOM destination.

13.1.2.3.1. Default Settings (dicom-server-config.yaml)

# Copyright (c) 2019, NVIDIA CORPORATION.  All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto.  Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.

dicom:
  scp:
    port: 104
    read-aetitles-from-crd: true
    read-sources-from-crd: true
    max-associations: 2
    verification:
      enabled: true
      transfer-syntaxes:
        - "1.2.840.10008.1.2" #Implicit VR Little Endian
        - "1.2.840.10008.1.2.1" #Explicit VR Little Endian
        - "1.2.840.10008.1.2.2" #Explicit VR Big Endian
    log-dimse-datasets: false
    reject-unknown-sources: true
  scu:
    ae-title: ClaraSCU
    max-associations: 2
    read-destinations-from-crd: true
storage:
  temporary: /payloads

Please refer to DICOM Configuration Schema for complete reference.

13.1.2.3.2. Helm Chart Storage Configuration

The DICOM Adapter helm chart, by default, creates a persisted volume claim with 50Gi on /clara-io/clara-core/payloads which is mounted to /payloads inside the DICOM Adapter container.

To increase or decrease the size of the volume claim, please find and modify the volumeSize property in ~/.clara/charts/dicom-adapter/values.yaml and restart the DICOM Adapter.

13.1.2.3.3. CLI

If read-aetitles-from-crd, read-sources-from-crd and/or read-destinations-from-crd are set to true, the Clara CLI tool can be used to configure Clara AE Titles, DICOM Sources and/or DICOM Destinations respectively. RESTful APIs may also be used for the same purpose.

13.1.2.3.4. To Run the Clara DICOM Adapter Using the Clara CLI

To configure the DICOM Adapter, update ~/.clara/charts/dicom-adapter/files/dicom-server-config.yaml and then run the following command:

clara dicom start

If the DICOM Adapter is already running, use the following command to stop the service first:

clara dicom stop

13.1.2.3.5. Setup a new Clara Pipeline

To setup a new Clara Pipeline and associate the pipeline with the DICOM Adapter, you must first register the pipeline with Clara using Clara CLI:

$ clara create pipelines -p COVID-19-pipeline.yaml
PIPELINE_ID:f77133edeed7485387a21c69d92214a0

Next, with the Pipeline ID returned by the command, create a new Clara AE Title and associate it with the pipeline:

$ clara dicom create aetitle -n covid -p f77133edeed7485387a21c69d92214a0 -a COVIDAET

SCP AE Title added successfully:
{
        "apiVersion": "dicom.clara.nvidia.com/v1beta1",
        "kind": "ClaraAeTitle",
        "metadata": {
                "creationTimestamp": "2020-07-29T17:04:11Z",
                "generation": 1,
                "name": "covid",
                "namespace": "default",
                "resourceVersion": "5741778",
                "selfLink": "/apis/dicom.clara.nvidia.com/v1beta1/namespaces/default/claraaetitles/covid",
                "uid": "1b7e4a58-c5e9-4cc7-828b-10410cfa1311"
        },
        "spec": {
                "aeTitle": "COVIDAET",
                "ignoredSopClasses": [],
                "name": "covid",
                "overwriteSameInstance": false,
                "pipelineId": "f77133edeed7485387a21c69d92214a0",
                "processors": [
                        "Nvidia.Clara.Dicom.Processors.JobProcessor, Nvidia.Clara.DicomAdapter"
                ],
                "timeout": 0
        },
        "status": {
                "Enabled": true
        }
}

Note: Per the DICOM standard, the length of the ae-Title value should not exceed 16 characters.

With Clara AE Title setup, Clara DICOM Adapter is now ready to receive DICOM associations with the AE Title COVIDAET setup above. Next, in order to accept data from external DICOM devices, we must add those devices to the whitelist. E.g.

$ clara dicom create source -a DCM4CHEE -i 10.1.2.3

{
        "apiVersion": "dicom.clara.nvidia.com/v1beta1",
        "kind": "Source",
        "metadata": {
                "creationTimestamp": "2020-07-29T17:07:36Z",
                "generation": 1,
                "name": "dcm4chee",
                "namespace": "default",
                "resourceVersion": "5742049",
                "selfLink": "/apis/dicom.clara.nvidia.com/v1beta1/namespaces/default/sources/dcm4chee",
                "uid": "415801fa-cbf7-4117-8cf5-dd5af7499518"
        },
        "spec": {
                "aeTitle": "DCM4CHEE",
                "hostIp": "10.1.2.3"
        },
        "status": {
                "Enabled": true
        }
}

Once the source is added to the whitelist, **DCM4CHEE** from **10.1.2.3** may start sending DICOM instances to the AE Title **COVIDAET**.


The next step is to export the results processed by the COVID-19 pipeline we've setup above to an external DICOM device.
In the pipeline YAML file (COVID-19-pipeline.yaml), we have an operator called **register-dicom-output** that is configured to export data to an external DICOM device called **MYPACS**, so we will setup a DICOM destination as follows:

```bash
$ clara dicom create destination -a DCM4CHEE -i 10.2.3.4 -n MYPACS -p 104


{
        "apiVersion": "dicom.clara.nvidia.com/v1beta1",
        "kind": "Destination",
        "metadata": {
                "creationTimestamp": "2020-07-29T17:14:59Z",
                "generation": 1,
                "name": "mypacs",
                "namespace": "default",
                "resourceVersion": "5742632",
                "selfLink": "/apis/dicom.clara.nvidia.com/v1beta1/namespaces/default/destinations/mypacs",
                "uid": "17bcee5b-1186-4b7e-86e3-dcf8cc8a4f84"
        },
        "spec": {
                "aeTitle": "DCM4CHEE",
                "hostIp": "10.2.3.4",
                "name": "MYPACS",
                "port": 104
        },
        "status": {
                "Enabled": true
        }
}

To summarize we’ve done:

  1. Register COVID-19 pipeline with Clara

  2. Setup Clara AE Title to run the COVID-10 pipeline

  3. Setup DICOM Source to allow incoming association requests

  4. Setup DICOM Destination for exporting processed results