Send DICOM Images to Google Cloud Platform once upload

Hi Everyone,

On my Windows laptop, I have installed Orthanc also setup Dicomweb server and Google Cloud Platform plugin (already enabled Google Cloud Healthcare API) so I am able to upload DICOM images once I clicked on Send to DICOMweb Server button.

But I want to send DICOM Images to Google Cloud Platform once upload. Is there any way to achieve this.

Thanks,
Neha

upload_gcp.PNG

Hello,

I don’t understand your question: The “Send to DICOMweb server” allows precisely to upload DICOM instances from Orthanc to Google Cloud Platform.

If you want to do the opposite (i.e. retrieve DICOM instances from Google Cloud Platform to your local Orthanc server), use the “Open DICOMweb Client” button that appears on the welcome screen of Orthanc Explorer when the DICOMweb plugin is installed (see screenshot).

Sébastien-

gcp.png

Hi Sebastien,

Yes you are right, “Send to DICOMweb server” allows precisely to upload DICOM instances from Orthanc to Google Cloud Platform. but I want to make this process dynamic. Once I upload the images, it should go to Google Cloud Platform directly without clicking on button(Send to DICOMweb server)

Thanks & Regards,
Neha

This could easily be automated through Lua scripting:

  1. React to callback “OnStableStudy()”: https://book.orthanc-server.com/users/lua.html#callbacks-to-react-to-events
  2. Call “RestApiPost()” on “/dicom-web/servers/…/stow” given the “studyId” provided by Orthanc to the callback: https://book.orthanc-server.com/plugins/dicomweb.html#sending-dicom-resources-to-a-stow-rs-server

Dear Sébastien,

Thank you for your help. I also looking for a solution for this issue also.

Best regards,
Thien Le

Dear Sebastien,

I tried to follow your instruction but still not got any success. In detail, I want to automatically upload to DicomWeb server named “Chula-EyeORA” (see the attached picture) whenever new study comes to my orthanc server.

I also uploaded the Autorouting.lua script for your consideration.

Thank you for you help.

@Neha: Can you share your worked script with me? Thank.

Best regards,
Thien Le

issue.png

Autorouting.lua (393 Bytes)

Hello,

Before anything, please learn the Lua programming language:
http://www.lua.org/manual/

Your script is not valid Lua. It mixes command lines within Lua, which is strictly no sense. For reference, I copy/paste your script below:

function OnStableStudy(studyId, tags, metadata)

$ curl http://localhost:8042/dicom-web/servers/https://healthcare.googleapis.com/v1beta1/projects/chulapacs/locations/asia-southeast1/datasets/Chulahospital/dicomStores/EyeORA/dicomWeb/stow -X POST -d @- << EOF
{
“Resources” : [
“6ca4c9f3-5e895cb3-4d82c6da-09e060fe-9c59f228”
]
“Synchronous” : false,
“Priority” : 10
}
EOF
end

Also, this clearly does not correspond to what I wrote earlier, i.e. “Call ‘RestApiPost()’ on ‘/dicom-web/servers/…/stow’”, which is an URI internal to the REST API of Orthanc, not an URL of Google Cloud Platform.

Hi Sebastien,

Thank you for your reply. I will learn the Lua language.