Mercurial > hg > orthanc
annotate Plugins/Samples/ModalityWorklists/WorklistsDatabase/Generate.py @ 3609:f7ade98d8229 storage-commitment
done RequestStorageCommitment()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 20 Jan 2020 18:55:28 +0100 |
parents | 76b3228f99b0 |
children |
rev | line source |
---|---|
1802 | 1 #!/usr/bin/python |
2 | |
3 import os | |
4 import subprocess | |
5 | |
6 SOURCE = '/home/jodogne/Downloads/dcmtk-3.6.0/dcmwlm/data/wlistdb/OFFIS/' | |
7 TARGET = os.path.abspath(os.path.dirname(__file__)) | |
8 | |
3587
76b3228f99b0
Sort file lists
Bernhard M. Wiedemann <bernhard+hgcommit@lsmod.de>
parents:
1802
diff
changeset
|
9 for f in sorted(os.listdir(SOURCE)): |
1802 | 10 ext = os.path.splitext(f) |
11 | |
12 if ext[1].lower() == '.dump': | |
13 subprocess.check_call([ | |
14 'dump2dcm', | |
15 '-g', | |
16 '-q', | |
17 os.path.join(SOURCE, f), | |
18 os.path.join(TARGET, ext[0].lower() + '.wl'), | |
19 ]) |