Mercurial > hg > orthanc-book
diff 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 |
line wrap: on
line diff
--- a/Sphinx/source/users/rest.rst Tue Jan 07 08:37:15 2020 +0100 +++ b/Sphinx/source/users/rest.rst Mon Jan 20 14:43:22 2020 +0100 @@ -64,6 +64,20 @@ $ python ImportDicomFiles.py localhost 8042 ~/DICOM/ +.. highlight:: perl + +If you are using Powershell (>= 3.0), you can use the following to send a single +Dicom instance to Orthanc:: + + # disabling progress bar tremendously increases the Invoke-RestMethod call + $ProgressPreference = 'SilentlyContinue' + + # upload it to Orthanc + $reply = Invoke-RestMethod http://localhost:8042/instances -Method POST -InFile CT.X.1.2.276.0.7230010.dcm + + # display the result + Write-Host "The instance can be retrieved at http://localhost:8042$($reply.Path)" + .. _rest-access: Accessing the content of Orthanc