NGC | Catalog
CatalogResourcesClara Deploy AI Prostate Segmentation Pipeline [Deprecated]

Clara Deploy AI Prostate Segmentation Pipeline [Deprecated]

Logo for Clara Deploy AI Prostate Segmentation Pipeline [Deprecated]
Description
Clara Deploy AI Prostate Segmentation Pipeline
Publisher
NVIDIA
Latest Version
0.8.1-2108.1
Modified
April 4, 2023
Compressed Size
103.69 MB

Clara Deploy SDK is being consolidated into Clara Holoscan SDK

More info https://catalog.ngc.nvidia.com/orgs/nvidia/teams/clara/collections/claradeploy

Clara AI Prostate Segmentation Pipeline

This asset requires the Clara Deploy SDK. Follow the instructions on the Clara Ansible page to install the Clara Deploy SDK.

Overview

The Prostate Segmentation pipeline is one of the reference pipelines provided in the Clara Deploy SDK. A pre-trained model for volumetric (3D) prostate segmentation is used in this pipeline, taking a DICOM series as the input. This pipeline depends on the Clara Deploy DICOM Adapter to receive DICOM instances, specifically the single channel MRI T2 series. Once the DICOM instances are stored, the pipeline is started to first convert the DICOM instances to a volume image in MetaImage format and then processes the input volume image with the prostate segmentation AI model. The AI model generates the labeled segementation as a binary mask on slices of the volume with the same size as the input. The prostate is labeled as 1, and the background is labeled as 0. In its final steps, the pipeline generate three outputs:

  • DICOM RT Structure Set intance in a new series of the original study, optionally sent to a configurable DICOM device. Introduced in Release 0.7.4 is a DICOM private tag whose value is the binary content of the stl file for the surface mesh of the segmentation image: Tag (0011, 1001) has the VR of OB and its value the binary data of the stl file, while (0011,0010) is for the Private Creator Data Element.
  • Binary mask in a new DICOM series of the original study, optional sent to the same DICOM device as above.
  • The original and segmented volumes in MetaImage format to the Clara Deploy Render Server for visualization on the Clara Dashboard.

Pipeline Definition

The Prostate Segmentation pipeline is defined in the Clara Deploy pipeline definition language. This pipeline utilizes built-in reference containers to construct the following set of operators:

  • The dicom-reader operator converts input DICOM data into volume images in mhd format.
  • The prostate-segmentation operator performs AI inference against the NVIDIA Triton Inference server to generate segmentation volume images.
  • The dicom-writer converts the segmented volume image into DICOM instances with a new series instance UID and the original DICOM study instance UID.
  • The register-dicom-output operator registers the DICOM instances with the Clara Deploy DICOM Adapter which in turn stores the instance on external DICOM devices per configuration.
  • The register-volume-images-for-rendering operator registers original and segmented volume images with the Clara Deploy Render Server for visualization.

The following is the details of pipeline definition, with comments describing each operator's functions as well as input and output.

api-version: 0.4.0
name: prostate-pipeline
operators:
# dicom reader operator
# Input: '/input' mapped directly to the input of the pipeline, which is populated by the DICOM Adaptor.
# Output:'/output' for saving converted volume image in MHD format to file whose name
#            is the same as the DICOM series instance ID.
- name: dicom-reader
  description: Converts DICOM instances into MHD, one file per DICOM series.
  container:
    image: clara/dicom-reader
    tag: latest
  input:
  - path: /input
  output:
  - path: /output
# prostate-segmentation operator
# Input: `/input` containing volume image data, MHD format, with a single volume.
# Output: `/output` containing segmented volume image, MHD format.
#         `/publish` containing original and segmented volume images, MHD format,
#             along with rendering configuration file.
- name: prostate-segmentation
  description: Segmentation of prostate using DL trained model.
  container:
    image: clara/ai-prostate
    tag: latest
  requests:
    memory: 4096
  input:
  - from: dicom-reader
    path: /input
  output:
  - path: /output
    name: segmentation
  - path: /publish
    name: rendering
  - path: /logs
    name: logs
  services:
  - name: trtis
  # Triton Inference Server, required by this AI application.
    container:
      image: nvcr.io/nvidia/tritonserver
      tag: 20.07-v1-py3
      command: ["tritonserver", "--model-repository=$(NVIDIA_CLARA_SERVICE_DATA_PATH)/models"]
    # services::connections defines how the TRTIS service is expected to
    # be accessed. Clara Platform supports network ("http") and
    # volume ("file") connections.
    connections:
      http:
      # The name of the connection is used to populate an environment
      # variable inside the operator's container during execution.
      # This AI application inside the container needs to read this variable to
      # know the IP and port of TRTIS in order to connect to the service.
      - name: NVIDIA_CLARA_TRTISURI
        port: 8000
      # Some services need a specialized or minimal set of hardware. In this case
      # NVIDIA Tensor RT Inference Server [TRTIS] requires at least one GPU to function.
# dicom writer operator
# Input1: `/input` containing a volume image file, in MHD format, name matching the DICOM series instance UID.
# Input2: `/dicom` containing original DICOM instances, i.e. dcm file.
# Output: `/output` containing the DICOM instances converted from the volume image, with updated attributes
#         based on original DICOM instances.
- name: dicom-seg-writer
  description: Converts MHD into DICOM instance with attributes based on the original instances.
  container:
    image: clara/dicom-seg-writer
    tag: latest
  variables:
    NVIDIA_SEG_LABELS: "[\"Prostate\"]"
  input:
  - from: prostate-segmentation
    name: segmentation
    path: /input
  - path: /dcm
  output:
  - path: /output
    name: dicom
  - path: /logs
    name: logs
# dicom RTSTRUCT writer operator
# Input1: `/input` containing a volume image file, in MHD format.
# Input2: `/dcm` containing original DICOM instances, i.e. dcm files.
# Output: `/output` containing the DICOM RT Structure Set instance for the segmentation mask contours,
#         with attributes referring to the original DICOM Series.
- name: rtstruct-writer
  description: Converts MHD into DICOM RTSTRUCT instance with attributes rfererring to the original instances.
  container:
    image: clara/rtstruct_writer
    tag: latest
  requests:
    memory: 2048
  input:
  - from: prostate-segmentation
    name: segmentation
    path: /input
  - path: /dcm
  output:
  - path: /output
    name: dicom
  - path: /logs
    name: logs
# register-volume-images-for-rendering operator
# Input: Published original and segmented volume images, MHD format, along with rendering configuration file
#        from the segmentation operator.
# Output: N/A. Input data will be sent to the destination, namely `renderserver` for Render Server DataSet Service.
- name: register-volume-images-for-rendering
  description: Register volume images, MHD format, for rendering.
  container:
    image: clara/register-results
    tag: latest
    command: ["python", "register.py", "--agent", "renderserver"]
  input:
  - from: prostate-segmentation
    name: rendering
    path: /input
# register-dicom-output operator
# Input: `/input` containing DICOM instances in the named output, `dicom` from dicom-seg-writer operator.
# Output: N/A. Input data will be sent to the destinations, namely DICOM devices, by the Clara DICOM SCU agent.
- name: register-dicom-output
  description: Register converted DICOM instances with Results Service to be sent to external DICOM devices.
  container:
    image: clara/register-results
    tag: latest
    command: ["python", "register.py", "--agent", "ClaraSCU", "--data", "[\"MYPACS\"]"]
  input:
  - from: dicom-seg-writer
    name: dicom
    path: /input
# register-dicom-RTSTRUCT-output operator
# Input: `/input` containing DICOM instance in the named output, `dicom` from rtstruct-writer operator.
# Output: N/A. Input data will be sent to the destinations, namely DICOM devices, by the Clara DICOM SCU agent.
- name: register-dicom-rtstruct-output
  description: Register converted DICOM RTSTRUCT instance with Results Service to be sent to external DICOM devices.
  container:
    image: clara/register-results
    tag: latest
    command: ["python", "register.py", "--agent", "ClaraSCU", "--data", "[\"MYPACS\"]"]
  input:
  - from: rtstruct-writer
    name: dicom
    path: /input

Executing the Pipeline

Please refer to the Quick Start Guide section on how to register a pipeline, configure the DICOM Adapter, and execute the pipeline.

License

An End User License Agreement is included with the product. By pulling and using the Clara Deploy asset on NGC, you accept the terms and conditions of these licenses.

Suggested Reading

Release Notes, the Getting Started Guide, and the SDK itself are available at the NVIDIA Developer forum: (https://developer.nvidia.com/clara).

For answers to any questions you may have about this release, visit the NVIDIA Devtalk forum: (https://devtalk.nvidia.com/default/board/362/clara-sdk/).