Difficulty Retrieving Orthanc ID Efficiently with Parametric Requests

Hello everyone,

I’m developping an extension for OHIF Viewer for apply deep learning and I use Orthanc in dicom web serv. I’m currently facing a challenge in my workflow with Orthanc, where I need to efficiently retrieve the Orthanc ID based on the SOPInstanceUID of a DICOM file. Ideally, I would like to use a parametric request such as /instances?SOPInstanceUID=... to directly fetch the desired instance, but it appears that this functionality isn’t directly supported by Orthanc API. And I can’t check all instances of a study, my network isn’t fast.

If you have any solutions, you are welcome

Hello

The /tools/lookup route allows you to find the Orthanc ID based on the SOP Instance UID. Here’s an example:

❯ curl -d '1.2.276.0.7230010.3.1.4.0.1.1718087747.63278' -u orthanc:orthanc http://localhost:8042/tools/lookup                                                                                                                                                                      
[
   {
      "ID" : "78dc304d-2e4545d1-4a92c34d-5e82f61a-c55f52dd",
      "Path" : "/instances/78dc304d-2e4545d1-4a92c34d-5e82f61a-c55f52dd",
      "Type" : "Instance"
   }
]

The same with httpie would be http -a orthanc:orthanc POST :8042/tools/lookup --raw '1.2.276.0.7230010.3.1.4.0.1.1718087747.63278'

Is this what you were looking for?

1 Like

Oh, thank you ! This is exactly what I needed !

Have a nice day

1 Like