PHP Script to upload Dicom

304 views
Skip to first unread message

Stephen

unread,
Nov 1, 2021, 12:20:29 AM11/1/21
to Orthanc Users
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.

Stephen

unread,
Nov 3, 2021, 1:30:37 PM11/3/21
to Orthanc Users
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 ?

Salim Kanoun

unread,
Nov 3, 2021, 2:32:42 PM11/3/21
to Stephen, Orthanc Users
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

--
You received this message because you are subscribed to the Google Groups "Orthanc Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orthanc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orthanc-users/e584e707-fd3b-4242-9375-cfdbd1e8ea12n%40googlegroups.com.

Sébastien Jodogne

unread,
Nov 24, 2021, 10:50:57 AM11/24/21
to Orthanc Users
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?

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

Sébastien-
Reply all
Reply to author
Forward
0 new messages