# DICOM storage and transport

HAI-DEF endpoints that deal with DICOM imaging, such as
[Path Foundation](https://developers.google.com/health-ai-developer-foundations/path-foundation/serving-api)
and
[CXR Foundation](https://developers.google.com/health-ai-developer-foundations/cxr-foundation/serving-api),
are capable of retrieving their input data from
[DICOM](https://cloud.google.com/healthcare-api/docs/concepts/dicom) storage
systems that meet the following requirements:

> [!TIP]
> **Tip:** [Google Cloud DICOM store](https://cloud.google.com/healthcare-api/docs/concepts/dicom) is the recommended DICOM store. If you don't have a compatible DICOM store yet, try HAI-DEF endpoints with our [curated test datasets](https://developers.google.com/health-ai-developer-foundations/model-data/curated-test-data) or upload your image files, such as [PNG](https://en.wikipedia.org/wiki/PNG) or [JPEG](https://en.wikipedia.org/wiki/JPEG) files, to a [Google Cloud Storage (GCS)](https://cloud.google.com/storage) bucket. Some HAI-DEF endpoints such as [CXR Foundation](https://github.com/Google-Health/cxr-foundation/tree/master/python/serving/README.md) accept DICOM instances as binary files with `.dcm` extension stored in GCS buckets. Read more about [model data in GCS](https://developers.google.com/health-ai-developer-foundations/model-data/google-cloud-storage).

## DICOM standard storage

HAI-DEF endpoints require DICOM imaging to conform to the
[DICOM standard](https://www.dicomstandard.org/). This includes defining all
required
[Type-1 tags](https://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_7.4.html)
and ensuring that tag values comply with their specified
[Value Representation (VR)](https://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_6.2.html)
and
[Value Multiplicity (VM)](https://dicom.nema.org/dicom/2013/output/chtml/part05/sect_6.4.html)
codes.

## DICOMweb transport protocol

HAI-DEF endpoints require the DICOM storage system holding the imaging to
support the [DICOMweb REST API](https://www.dicomstandard.org/using/dicomweb)
and more specifically JSON formatted
[QIDO-RS](https://www.dicomstandard.org/using/dicomweb/query-qido-rs) and
[WADO-RS](https://www.dicomstandard.org/using/dicomweb/retrieve-wado-rs-and-wado-uri)
over [HTTPS protocol](https://en.wikipedia.org/wiki/HTTPS).

The Uniform Resource Identifiers (URIs) must end with a valid DICOMweb suffix:
for example the URI for a
[DICOM series](https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_c.7.3.html)
must end with a `studies/${STUDY-UID}/series/${SERIES-UID}` suffix.

## Transfer syntax transcoding

HAI-DEF endpoints transcode their DIOCM inputs based on the
[Transfer Syntax UID](https://www.dicomlibrary.com/dicom/transfer-syntax/).
Refer to the respective serving API specification for details.

## Private network accessibility

HAI-DEF endpoints operate within the secure Google Cloud private network as
[Vertex AI prediction endpoints](https://cloud.google.com/vertex-ai/docs/predictions/overview).
Therefore, if you plan to use HAI-DEF endpoints with DICOMWeb data links, the
DICOMWeb store has to be accessible from this private network. Refer to
[Google Cloud private access options](https://cloud.google.com/vpc/docs/private-access-options).

## Authentication and authorization

The DICOMweb storage system either must support public access or accept
[OAuth 2.0 bearer tokens](https://www.rfc-editor.org/rfc/rfc6750) for
authorization.