How to add annotations to a resource using the REST API?

306 views
Skip to first unread message

Farhood Etaati

unread,
Feb 2, 2022, 2:40:08 AM2/2/22
to Orthanc Users
Hello.

I am trying to set up a labeling pipeline for medical data, and we are using ORTHANC as our DICOM server as of now. The REST API of ORTHANC has methods for creating and deleting resources, but I could not find anyway to update a resource there.

The annotations for each resource can be a segmentation mask, or a classification tag (label), or both.

1. Is it possible to do such a thing? Or should I delete and recreate resources everytime I want to update?

2. How should annotations be stored?

Thanks!

Sébastien Jodogne

unread,
Feb 2, 2022, 4:52:21 AM2/2/22
to Orthanc Users
Hello,

DICOM resources are immutable in order to ensure medical traceability, so you cannot "update" them without recreating another DICOM instance with a different SOP Instance UID.

You essentially have 2 possibilities:
- Either store your annotations as separate DICOM instances (cf. DICOM-SR, DICOM GSPS...), or
- Store your annotations as attachments or metadata to an existing DICOM study/series/instance: https://book.orthanc-server.com/faq/features.html#metadata-attachments

HTH,
Sébastien-
Reply all
Reply to author
Forward
0 new messages