Hello!
I don’t know how to enter user + password.
My configuration is :
Orthanc version: 1.12.2
ArchiveStudiesInTimeRange -last version
root@debian:~# uname -a
Linux debian 5.10.0-16-amd64 #1 SMP Debian 5.10.127-2 (2022-07-23) x86_64 GNU/Linux
root@debian:~# python -V
Python 3.9.2
Hi,
I have just added support for login/pwd in the script:
https://orthanc.uclouvain.be/hg/orthanc/rev/2bce8d26db5e
HTH,
Alain
dansdec
February 17, 2024, 2:50pm
4
Thanks ! It work!
I tested the few days ago, but I didn’t have time to post a result.
I have one more question: how can I find out the number of images of a study and insert this number in the name of the archive.
This is useful in order to check the integrity of the archive. Do I have to open another post?
Hello,
You can easily do this using the REST API of Orthanc , for instance:
import requests
URL = 'https://demo.orthanc-server.com'
STUDY_ID = '27f7126f-4f66fb14-03f4081b-f9341db2-53925988'
r = requests.get('%s/studies/%s/instances' % (URL, STUDY_ID))
r.raise_for_status()
instances = r.json()
print('Number of instances in study: %d' % len(instances))
Don’t hesitate to adapt the source code of the script : This is precisely the advantage of using free and open-source software!
Regards,
Sébastien-
1 Like