Dear all,
I’ve managed to use Orthanc with WADO-RS and QIDO-RS, e.g. a query such as the following works fine:
curl -u orthanc:orthanc http://localhost:8042/dicom-web/studies -v
However, I’m not able to perform STOW-RS calls. If I try:
curl -X POST -H “Content-Type: application/dicom” -u orthanc:orthanc http://localhost:8042/dicom-web/studies myfile.dcm -v
… I get: < HTTP/1.1 405 Method Not Allowed
The same happens if I try the same call in Postman.
Any idea what I could be missing here ?
Thanks,
Greetings,
Sorin
Hello,
STOW-RS is more complex than what you expect, because you must send a multipart request to the DICOMweb server.
Check out the JavaScript and Python samples included in the source distribution of the DICOMweb to have a concrete example:
https://hg.orthanc-server.com/orthanc-dicomweb/file/tip/Resources/Samples
Note that your approach would work if using the built-in “/instances” route in the REST API of Orthanc (if you don’t have the obligation to use DICOMweb, this one is easier to use):
https://book.orthanc-server.com/users/rest.html#sending-dicom-images
Regards,
Sébastien-
Thank you very much. I wrote a C# program for STOW-RS inspired by the JavaScript and Python samples and it works fine.
Still, I find it hard to imagine that Orthanc offers also a “backdoor” with this “/instances” route. Why would they do that ? Is it just for the test ?
Thanks,
Greetings,
Sorin
This is not a “backdoor”, but the REST API of Orthanc:
https://book.orthanc-server.com/users/rest.html
https://api.orthanc-server.com/
DICOMweb offers a limited set of features in order to provide interoperability between imaging systems over Internet, whereas the REST API of Orthanc offers a full programmatic environment for developers to build their own applications.