accessing the folder which stores Dicom images

Good day

I’m still new to Orthanc still trying to figure out my way around it. I have a few questions

  1. In which folder does Orthanc store the .dcm files that I upload
  2. Is there a way to add new tags to a dicom image that has already been uploaded to Orthanc

Kind regards

Nigel Zulu

Hello,

1- This is explained in a FAQ in the Orthanc Book:
https://book.orthanc-server.com/faq/orthanc-storage.html

Here is how to download the DICOM file for an instance using the REST API of Orthanc:
https://book.orthanc-server.com/users/rest.html#downloading-images

WebDAV can also be used to easily and transparently access the “.dcm” files using a standard file explorer:
https://book.orthanc-server.com/users/webdav.html

2- The REST API of Orthanc can be used to modify DICOM tags:
https://book.orthanc-server.com/users/anonymization.html#anonymization

Regards,
Sébastien-

Thank you so much Sébastien for your response it was very helpful.

However, Orthanc Rest Api offers a facility where I can modify a tag and this is working properly but in my case, I would want to add an entirely new tag. Is there a way I can do that within Orthanc

Regards,
Nigel Bongani Zulu

The “Replace” argument can also be used to insert a new tag, not only to modify a preexisting tag:
https://book.orthanc-server.com/users/anonymization.html#modification-of-studies-or-serieshttps://api.orthanc-server.com/#tag/Studies/paths/~1studies~1{id}~1modify/post

Good day

Thank you for your response it was really helpful.

I’m trying to replace the tags using my python code. I had done this so far

modify_url = “http://localhost:8042/series/a26ad436-c783dc1e-497da249-0c566c47-525efd30/modify
modify_options = {“Content-Length”: “”, ‘Content-Type’: ‘application/json’}
body = {
“Replace”:{“PatientName”:Nigel Bongani Zulu"},
‘headers’ : modify_options
}

modify_response = requests.post(modify_url, data=json.dumps(body))

This seems to be working well but I’m wondering if there is a way I could use orthanc.RestApiPost()
to modify tags

Kind regards

Nigel Bongani Zulu

Hello,

You are talking here about two very distinct things:

(1) An external Python that is calling the REST API of Orthanc using the “requests” module:
https://book.orthanc-server.com/users/rest.html

(2) A Python plugin for Orthanc that calls the REST API from “from the inside” using “orthanc.RestApiPost()”.
https://book.orthanc-server.com/plugins/python.html

An external Python script cannot use “orthanc.RestApiPost()”.

Sébastien-