Mercurial > hg > orthanc-book
comparison Sphinx/source/users/rest.rst @ 839:c29ac12e3160
Orthanc-1.11.0
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 09 May 2022 13:11:36 +0200 |
parents | 66ff2f30afcc |
children | 3e8a3a900e9e |
comparison
equal
deleted
inserted
replaced
838:6afc236cd60a | 839:c29ac12e3160 |
---|---|
92 <https://stackoverflow.com/questions/463144/php-http-post-fails-when-curl-data-1024/463277#463277>`__:: | 92 <https://stackoverflow.com/questions/463144/php-http-post-fails-when-curl-data-1024/463277#463277>`__:: |
93 | 93 |
94 $ curl -X POST -H "Expect:" http://localhost:8042/instances --data-binary @CT.X.1.2.276.0.7230010.dcm | 94 $ curl -X POST -H "Expect:" http://localhost:8042/instances --data-binary @CT.X.1.2.276.0.7230010.dcm |
95 | 95 |
96 The code distribution of Orthanc contains a `sample Python script | 96 The code distribution of Orthanc contains a `sample Python script |
97 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.10.1/OrthancServer/Resources/Samples/ImportDicomFiles/ImportDicomFiles.py>`__ | 97 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.11.0/OrthancServer/Resources/Samples/ImportDicomFiles/ImportDicomFiles.py>`__ |
98 that recursively upload the content of some folder into Orthanc using | 98 that recursively upload the content of some folder into Orthanc using |
99 the REST API:: | 99 the REST API:: |
100 | 100 |
101 $ python ImportDicomFiles.py localhost 8042 ~/DICOM/ | 101 $ python ImportDicomFiles.py localhost 8042 ~/DICOM/ |
102 | 102 |
104 includes another Python script named ``OrthancImport.py`` that | 104 includes another Python script named ``OrthancImport.py`` that |
105 provides more features than ``ImportDicomFiles.py``. It can notably | 105 provides more features than ``ImportDicomFiles.py``. It can notably |
106 import the content of ``.zip``, ``.tar.gz`` or ``.tar.bz2`` archives | 106 import the content of ``.zip``, ``.tar.gz`` or ``.tar.bz2`` archives |
107 without having to uncompress them first. It also provides more | 107 without having to uncompress them first. It also provides more |
108 comprehensive command-line options. `Check this script out | 108 comprehensive command-line options. `Check this script out |
109 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.10.1/OrthancServer/Resources/Samples/ImportDicomFiles/OrthancImport.py>`__. | 109 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.11.0/OrthancServer/Resources/Samples/ImportDicomFiles/OrthancImport.py>`__. |
110 | 110 |
111 | 111 |
112 .. highlight:: perl | 112 .. highlight:: perl |
113 | 113 |
114 If you are using Powershell (>= 3.0), you can use the following to send a single | 114 If you are using Powershell (>= 3.0), you can use the following to send a single |
434 Downloading decoded images from Python | 434 Downloading decoded images from Python |
435 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 435 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
436 | 436 |
437 .. highlight:: python | 437 .. highlight:: python |
438 | 438 |
439 Starting with Orthanc 1.10.1, it is possible to immediately download | 439 Starting with Orthanc 1.11.0, it is possible to immediately download |
440 DICOM instances and DICOM series as numpy arrays (even if they use a | 440 DICOM instances and DICOM series as numpy arrays (even if they use a |
441 compressed transfer syntax). This is especially useful for the | 441 compressed transfer syntax). This is especially useful for the |
442 integration within AI (artificial intelligence) pipelines. Here is a | 442 integration within AI (artificial intelligence) pipelines. Here is a |
443 sample call:: | 443 sample call:: |
444 | 444 |
1094 | 1094 |
1095 "Limit":4 | 1095 "Limit":4 |
1096 | 1096 |
1097 .. highlight:: bash | 1097 .. highlight:: bash |
1098 | 1098 |
1099 Since Orthanc 1.11.0 (not released yet), you may also request a specific list of tags in the response (like in a C-FIND) even if these | 1099 Since Orthanc 1.11.0, you may also request a specific list of tags in the response (like in a C-FIND) even if these |
1100 tags are not stored in the MainDicomTags or if the tags needs to be computed (like ``ModalitiesInStudy``). This ``RequestedTags`` option is | 1100 tags are not stored in the MainDicomTags or if the tags needs to be computed (like ``ModalitiesInStudy``). This ``RequestedTags`` option is |
1101 available only if you specify ``"Expand": true``:: | 1101 available only if you specify ``"Expand": true``:: |
1102 | 1102 |
1103 $ curl -X POST http://localhost:8042/tools/find -d ' | 1103 $ curl -X POST http://localhost:8042/tools/find -d ' |
1104 { | 1104 { |