Mercurial > hg > orthanc-book
comparison Sphinx/source/users/rest.rst @ 732:bfc31c51809f
download pdf and videos
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 30 Jun 2021 07:36:53 +0200 |
parents | 8a247c645ac6 |
children | e6386c012438 |
comparison
equal
deleted
inserted
replaced
731:f4ff5a1af41e | 732:bfc31c51809f |
---|---|
438 $ curl http://localhost:8042/studies/6b9e19d9-62094390-5f9ddb01-4a191ae7-9766b715/archive > Study.zip | 438 $ curl http://localhost:8042/studies/6b9e19d9-62094390-5f9ddb01-4a191ae7-9766b715/archive > Study.zip |
439 | 439 |
440 It is also possible to download a zipped DICOMDIR through:: | 440 It is also possible to download a zipped DICOMDIR through:: |
441 | 441 |
442 $ curl http://localhost:8042/studies/6b9e19d9-62094390-5f9ddb01-4a191ae7-9766b715/media > Study.zip | 442 $ curl http://localhost:8042/studies/6b9e19d9-62094390-5f9ddb01-4a191ae7-9766b715/media > Study.zip |
443 | |
444 | |
445 .. _download-pdf-videos: | |
446 | |
447 Downloading PDF or videos | |
448 ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
449 | |
450 .. highlight:: bash | |
451 | |
452 Given a DICOM instance that embeds a PDF file (typically, one instance | |
453 whose SOP Class UID is ``1.2.840.10008.5.1.4.1.1.104.1`` - | |
454 Encapsulated PDF Storage), the PDF content can be downloaded as | |
455 follows:: | |
456 | |
457 $ curl http://localhost:8042/instances/1915e0cc-c2c1a0fc-12cdd7f5-3ba32114-a97c2c9b/content/0042,0011 > sample.pdf | |
458 | |
459 This corresponds to downloading the raw DICOM tag "Encapsulated | |
460 Document" (0042,0011). Beware that the last byte of the downloaded | |
461 file might correspond to one padding byte, if the source PDF had an | |
462 odd number of bytes. | |
463 | |
464 Similarly, if you know that a DICOM instance :ref:`embeds a video | |
465 <videos>` (which can be tested by checking the :ref:`value of the | |
466 metadata <metadata-core>` corresponding to its transfer syntax UID), | |
467 the raw video can be downloaded as follows:: | |
468 | |
469 $ curl http://localhost:8042/instances/e465dd27-83c96343-96848735-7035a133-1facf1a0/frames/0/raw > sample.mp4 | |
443 | 470 |
444 | 471 |
445 .. _peering: | 472 .. _peering: |
446 | 473 |
447 Sending resources to remote Orthanc over HTTP/HTTPS (through Orthanc peering) | 474 Sending resources to remote Orthanc over HTTP/HTTPS (through Orthanc peering) |