Brak opisu

NIX User f13644aaa3 Adding networkConfig flag to setup will use other server as the one specified in network.json. File named in networkConfig should exist in .labkey directory of the user executing the script 2 lat temu
pythonScripts f13644aaa3 Adding networkConfig flag to setup will use other server as the one specified in network.json. File named in networkConfig should exist in .labkey directory of the user executing the script 2 lat temu
scripts 1a0d3bd1c1 Adding first data manipulation files and automatic uploads to orthanc 2 lat temu
LICENSE 9d2c9199e2 Add LICENSE 4 lat temu
Readme.md 10f0554ab8 Update Readme.md 4 lat temu
network-config-sample.json ac9c7730f7 Update network-config-sample.json 4 lat temu
orthancDatabaseBrowser.py fdca6cabcf Merge to head 4 lat temu
orthancFileBrowser.py 404538e450 Updates 4 lat temu
orthancInterface.py fdca6cabcf Merge to head 4 lat temu

Readme.md

Orthanc Python interface

A Python3 urllib3 based interface for communication with the Orthanc server. Provides simple REST API interfaces integrated in python code.

Setup

Update network-config-sample.json with personal information needed to access the site (username and password) When using orthancInterface, use the updated file as input to orthancInterface constructor, ie

ifc=orthancInterface.orthancInterface('/path/to/network-config.json')

Orthanc configuration file can be merged with the LabKeyInterface configuration file.

Use

Sample usage:

fhome=os.path.expanduser('~')
fconfig=os.path.join(fhome,'.labkey','network.json')
onet=orthancInterface.orthancInterface()
onet.init(fconfig)
ofb=orthancFileBrowser.orthancFileBrowser(onet)
...
#download seriesId to fname
ofb.getZip('series',seriesId,fname)

#upload dicom file
ofb.upload('/path/to/file.dcm')