comparison Sphinx/source/users/rest.rst @ 297:64d1ddab8246

Improved PDF creation Pwsh snippet + added Dicom instance upload example with Pwsh + added Windows docker script to generate book
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 20 Jan 2020 14:43:22 +0100
parents 33fb45a86cd8
children b19b892977a2
comparison
equal deleted inserted replaced
295:b4b9ceebe64d 297:64d1ddab8246
61 that recursively upload the content of some folder into Orthanc using 61 that recursively upload the content of some folder into Orthanc using
62 the REST API:: 62 the REST API::
63 63
64 $ python ImportDicomFiles.py localhost 8042 ~/DICOM/ 64 $ python ImportDicomFiles.py localhost 8042 ~/DICOM/
65 65
66
67 .. highlight:: perl
68
69 If you are using Powershell (>= 3.0), you can use the following to send a single
70 Dicom instance to Orthanc::
71
72 # disabling progress bar tremendously increases the Invoke-RestMethod call
73 $ProgressPreference = 'SilentlyContinue'
74
75 # upload it to Orthanc
76 $reply = Invoke-RestMethod http://localhost:8042/instances -Method POST -InFile CT.X.1.2.276.0.7230010.dcm
77
78 # display the result
79 Write-Host "The instance can be retrieved at http://localhost:8042$($reply.Path)"
66 80
67 .. _rest-access: 81 .. _rest-access:
68 82
69 Accessing the content of Orthanc 83 Accessing the content of Orthanc
70 -------------------------------- 84 --------------------------------