comparison Sphinx/source/users/rest.rst @ 168:86e92d0cc53e

information about images
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 12 Oct 2018 09:53:45 +0200
parents 498c9e42c99d
children 8239d44e0520
comparison
equal deleted inserted replaced
167:7ba16d90ed93 168:86e92d0cc53e
118 "Type" : "Patient" 118 "Type" : "Patient"
119 } 119 }
120 120
121 This is once again a JSON file. Note how Orthanc gives you a summary 121 This is once again a JSON file. Note how Orthanc gives you a summary
122 of the main DICOM tags that correspond to the patient level. 122 of the main DICOM tags that correspond to the patient level.
123
124
125 .. _browsing-hierarchy:
123 126
124 Browsing from the patient down to the instance 127 Browsing from the patient down to the instance
125 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 128 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126 129
127 .. highlight:: bash 130 .. highlight:: bash
325 Downloading images 328 Downloading images
326 ^^^^^^^^^^^^^^^^^^ 329 ^^^^^^^^^^^^^^^^^^
327 330
328 .. highlight:: bash 331 .. highlight:: bash
329 332
330 It is also possible to download a preview PNG image that corresponds to some DICOM instance:: 333 As :ref:`explained above <browsing-hierarchy>`, the raw DICOM file
331 334 corresponding to a single instance can be retrieved as follows::
332 $ curl http://localhost:8042/instances/e668dcbf-8829a100-c0bd203b-41e404d9-c533f3d4/preview > Preview.png 335
333 336 $ curl http://localhost:8042/instances/609665c0-c5198aa2-8632476b-a00e0de0-e9075d94/file > Instance.dcm
334 The resulting image will be a standard graylevel PNG image that can be opened by any painting software. 337
335 338 It is also possible to download a preview PNG image that corresponds
336 339 to some DICOM instance::
340
341 $ curl http://localhost:8042/instances/609665c0-c5198aa2-8632476b-a00e0de0-e9075d94/preview > Preview.png
342
343 The resulting image will be a standard graylevel PNG image (with 8
344 bits per pixel) that can be opened by any painting software. The
345 dynamic range of the pixel data is stretched to the [0..255] range.
346 An equivalent JPEG image can be downloaded by setting the `HTTP header
347 <https://en.wikipedia.org/wiki/List_of_HTTP_header_fields>`__
348 ``Accept`` to ``image/jpeg``::
349
350 $ curl -H 'Accept: image/jpeg' http://localhost:8042/instances/609665c0-c5198aa2-8632476b-a00e0de0-e9075d94/preview > Preview.png
351
352 If you don't want to stretch the dynamic range, and create a 8bpp or
353 16bpp PNG image, you can use the following URIs::
354
355 $ curl http://localhost:8042/instances/609665c0-c5198aa2-8632476b-a00e0de0-e9075d94/image-uint8 > full-8.png
356 $ curl http://localhost:8042/instances/609665c0-c5198aa2-8632476b-a00e0de0-e9075d94/image-uint16 > full-16.png
357
358 In these images, the values are cropped to the maximal value that can
359 be encoded by the target image format. The
360 ``/instances/{...}/image-int16`` is available as well to download
361 signed DICOM pixel data.
362
363 Since Orthanc 1.4.2, it is also possible to download such images in
364 the generic `PAM format
365 <https://en.wikipedia.org/wiki/Netpbm#PAM_graphics_format>`__::
366
367 $ curl -H 'Accept: image/x-portable-arbitrarymap' http://localhost:8042/instances/609665c0-c5198aa2-8632476b-a00e0de0-e9075d94/image-uint16 > full-16.pam
368
369 Users of Matlab or Octave can find related information :ref:`in the
370 dedicated section <matlab>`.
371
372
337 .. _changes: 373 .. _changes:
338
339
340 374
341 Sending resources to remote modalities 375 Sending resources to remote modalities
342 -------------------------------------- 376 --------------------------------------
343 377
344 Orthanc can send its DICOM instances to remote DICOM modalities (C-Store SCU). This process 378 Orthanc can send its DICOM instances to remote DICOM modalities (C-Store SCU). This process