9.2. CT Reconstruction Pipeline

9.2.1. Overview

CT reconstruction pipeline is defined using the Pipeline definition language (that Clara supports). Sample reconstruction pipeline is located in clara-reference-pipelines folder under SDK zip. All operators are deployed under “clara” folder (tag 0.2.0) and are defined with the same name in the pipeline definition.

9.2.2. Data

Sample lung dataset in dicom format is available within the SDK. If sample dataset (nvrtk_sample_d1_dicom_raw_0.0.1.zip) is desired, it can be extracted from test-data folder under SDK zip. If using the sample dataset, unzip it before using.

9.2.3. Operators

Recon pipeline definition consists of 4 operators (dicom-reader, recon-operator, dicom-writer, register-dicom-results). Dicom-reader operator converts input DICOM data into MHD format. Recon-operator reconstructs the input data coming from dicom-reader. Dicom-writer converts the reconstructed volume into DICOM format. Register-dicom-results operator transfers the DICOM volume (from dicom-writer) to configured PACS destination.

  • dicom-reader: Input dicom data is mounted on /input folder and the output from this operator goes into mounted /output folder. Dicom-reader operator reads in the input DICOM image, converts them into MHD. Output of dicom-reader becomes input of recon-operator as specified in the pipeline.

    Dicom-reader is the first container in the pipeline. For the first container, “from” field is not required in the “input” definition. Dicom-Adapter will pick the first operator in the pipeline and will send the data to its mounted /input folder.

    - name: dicom-reader
        description: Converts DICOM data into MHD.
        container:
            image: clara/dicom-reader # dicom-reader container
            tag: 0.2.0
        input: # specify where the input is coming from for this container
        -   path: /input # incoming data is mounted on container's /input folder
        output: # specify the ouput for this container
        -   path: /output
    
  • recon-operator: Recon operators takes the result from dicom-reader and mounts it to /app/in folder. Recon-operator has 3 output folders. ‘out’ folder gets the actual reconstructed volume. ‘logs’ folder gets all logs from recon-operator. ‘geom’ folder contains the geometry file created by recon-operator. Recon-operator defines the reconstruction parameters under ‘variables’. All parameters are defined in detail in recon operator definition. These variables are passed by platform as environment variables to the recon-operator at runtime. Reconstruction is GPU accelerated, and the need for GPU is specified with ‘request’ under recon-operator definition.

    - name: recon-operator
        description: CT reconstruction algorithm on 3D cone beam projections
        container:
            image: clara/recon-operator
            tag: 0.2.0
        variables: # All supported reconstruction parameters with values used for the sample dataset
            nvrtkalgo: fdk
            nvrtkhardware: gpu
            nvrtkhann: 0.95
            nvrtkdimension: 512,512,141
            nvrtkspacing: 0.976562,0.976562,2
            nvrtkorigin: -250,-250,-164.5
            nvrtkindir: in
            nvrtkoutdir: out # it is recommended to keep output folder separate from logs and geometry
            nvrtkgeomdir: geom # geometry file folder
            nvrtklogs: logs # log file folder
        requests:
            gpu: 1
        input: # specify the inputs coming to recon-operator under this field
        -   from: dicom-reader # input is coming from dicom-reader's output folder
            path: /app/in # input mount folder for recon-operator
        output: # specify the output from recon-operator under this field
        -   name: out # folder name that will contain the output, this name will be used
                      # if this folder is an input to any other operator
            path: /app/out # mounted path for out folder
        -   name: logs # folder name for logs
            path: /app/logs # mounted folder for logs
        -   name: geom # folder name for geometry file(s) created from within recon-operator
            path: /app/geom # mounted folder for geometry file(s)
    
  • dicom-writer: Reconstructed data goes as input to dicom-writer operator and is mounted on /input folder. Dicom-writer writes the results, on /output folder.

    - name: dicom-writer
        description: Converts MHD into DICOM data.
        container:
            image: clara/dicom-writer
            tag: 0.2.0
        input: # specify inputs coming to dicom-writer under this field
        -   from: recon-operator # input to dicom-writer is coming from recon-operator
            name: out # Folder with name "out" should be mounted from recon-operator's output folder
            path: /input # Input folder is mounted to /input folder of dicom-writer container
        -   path: /dicom
        output: # specify output of dicom-writer
        -   path: /output
            name: dicom # dicom-writer writes everything within the folder "dicom" under its output folder
    
  • register-dicom-results: Takes the output from dicom-writer operator and sends the dicom images to a pre-configured PACS destination.

    ‘command’ field specifies the startup for register-results operator with several arguments. Register-results operator uses dicom adapter configurations to register results. “–agent” field is used as a filter to query for results published by pipelines. In this pipeline, “ClaraSCU” is configured as ae-title for the scu services. “–data” argument specifies the name of destination PACS configurations. In example below “MYPACS” is one such configuration, and it can have multiple values if the results has to be shipped to multiple PACS destinations”. Refer to the dicom-server-config.yaml shipped with the SDK. For additional details refer to results-services operator and results

    - name: register-dicom-output
        description: Register reconstructed DICOM volume to external DICOM devices.
        container:
            image: clara/register-results
            tag: 0.2.0
        command: ["python", "register.py", "--agent", "ClaraSCU", "--data", "[\"MYPACS\"]"]
        input: # specify input for register-results
        -   from: dicom-writer # inputs comes from dicom-writer operator
            name: dicom # input comes from folder with name "dicom" from dicom-writer's output folder
            path: /input
    

Refer to the How to run a Reference Pipeline section for details on creating a new pipeline and the Pipeline Definition Language for details on the pipeline definition language.