PHP Script to upload Dicom

Hi,

I have searched Orthanc Documentation as well as userContributed at Github, but could not find the script to upload Dicom file / Zip folder to the Orthanc Server.

I have tried using CURL script but getting ‘bad format / invalid file’ error despite of correct dicom file.

Would appreciate if any one share working PHP script, preferably Guzzle PHP format to upload Dicom file to the Server.

Thank you.

Finally I figured out the issue.

It looks Orthanc fails to upload, if images are Zipped under multiple subfolders, for eg

parentfolder -
-----pd_images
-----t2_images
------t1_images

But, it uploads all images if all images are under one parent directory without any subfolders.

Is there any way to address this issue ?

Hi Stephen,

You are in PHP with zip Reading capabilities thanks to phpzip.

You can read your files in the zip with PHP and send it yourself one by one to orthanc.

Salim

Hello,

I think that Orthanc will successfully decompress ZIP archives with multiple subfolders.

Aren’t you dealing with DICOMDIR files, for which there was an issue in Orthanc < 1.9.7?

https://groups.google.com/g/orthanc-users/c/NPv-Z92JU6s

If this doesn’t explain your issue, please provide a sample ZIP file.

Sébastien-