SDK DICOM

This page outlines the basic principles of using the Encord SDK to work with DICOM files.

Getting started

  1. Make sure you have installed all prerequisites and the Encord SDK. If you haven't done so, all the instructions you need to do so are here.

  2. Ensure you have a public - private key pair to authenticate with Encord. To learn more about authentication in Encord see our documentation here.

👍

Tip

You can find instructions on creating a public-private key pair in the Encord platform here.

Common entities used when working with DICOM

The following table shows how to refer to various DICOM-related entities when using the Encord SDK.

EntityName in the SDKNotes
Datasetdataset_hashCorresponds to the dataset ID. Learn how to work with datasets here.
Data Unitdata_hashCorresponds to the data unit's ID.
Projectproject_hashCorresponds to the Project's ID. Learn how to work with projects here.
Ontologyontology_hashCorresponds to the Ontology's ID. Learn how to work with Ontologies here.
Study IDstudy_uidCorresponds to the Study ID as defined in the DICOM standard. Learn how to work with DICOM metadata here.
Series IDseries_uidCorresponds to the Series ID as defined in the DICOM standard. Learn how to work with DICOM metadata here.
Patient IDpatient_idCorresponds to the Patient ID as defined in the DICOM standard. Learn how to work with DICOM metadata here.
DICOM Instance IDdicom_instance_uidCorresponds to the DICOM Instance ID as defined in the DICOM standard. Learn how to work with DICOM metadata here.
Frame WidthwidthCorresponds to the columns attribute as defined in the DICOM standard. Learn how to work with DICOM metadata here.
Frame HeightheightCorresponds to the rows attribute as defined in the DICOM standard. Learn how to work with DICOM metadata here.

👍

Tip

The hash for any entity can be seen and copied by selecting the entity in the Encord platform, as shown below for an ontology.

DICOM metadata

Please see our tutorial on DICOM metadata to learn how to view metadata pertaining to a series, or individual slices.

Uploading DICOM data to Encord

To upload DICOM data to Encord:

  1. Create a dataset.
  2. Upload data from your local machine, or from private cloud storage.

ℹ️

Note

To add data from a cloud server, a JSON file specifying the files to be added is required. Click here to learn more.

👍

Tip

You can also use the Encord platform to create a dataset, and add data to the dataset.