# HG changeset patch # User Sebastien Jodogne # Date 1625031413 -7200 # Node ID bfc31c51809fe7de7beca50719bee0d0db2f6c42 # Parent f4ff5a1af41e89f3112df60ec34218fd07fe0774 download pdf and videos diff -r f4ff5a1af41e -r bfc31c51809f Sphinx/source/faq/features.rst --- a/Sphinx/source/faq/features.rst Tue Jun 29 17:37:12 2021 +0200 +++ b/Sphinx/source/faq/features.rst Wed Jun 30 07:36:53 2021 +0200 @@ -111,6 +111,7 @@ resources stored inside Orthanc. Once one DICOM instance leaves the Orthanc ecosystem, its associated metadata and attachments are lost. +.. _metadata-core: Core metadata ^^^^^^^^^^^^^ @@ -136,8 +137,11 @@ is expected to contain. This information is :ref:`not always available `. * Starting with Orthanc 1.2.0, ``TransferSyntax`` and ``SopClassUid`` - respectively stores the transfer syntax UID and the SOP class UID of - DICOM instances, in order to speed up the access to this + respectively stores the `transfer syntax UID + `__ + and the `SOP class UID + `__ + of DICOM instances, in order to speed up the access to this information. * ``RemoteIP`` (new in Orthanc 1.4.0): The IP address of the remote SCU (for REST API and DICOM protocol). diff -r f4ff5a1af41e -r bfc31c51809f Sphinx/source/faq/video.rst --- a/Sphinx/source/faq/video.rst Tue Jun 29 17:37:12 2021 +0200 +++ b/Sphinx/source/faq/video.rst Wed Jun 30 07:36:53 2021 +0200 @@ -1,3 +1,5 @@ +.. _videos: + Does Orthanc support videos? ============================ @@ -20,6 +22,10 @@ distinction is also discussed in :ref:`another FAQ entry `. +It is easy to **extract and download** the raw video embedded in the +DICOM instance using the :ref:`REST API of Orthanc +`. + If you also want to **play** the videos, the :ref:`Osimis Web Viewer plugin ` is able to play H.264 (MPEG4) videos and 2D+t (cine) sequences but not MPEG2 videos that currently can not be diff -r f4ff5a1af41e -r bfc31c51809f Sphinx/source/users/rest.rst --- a/Sphinx/source/users/rest.rst Tue Jun 29 17:37:12 2021 +0200 +++ b/Sphinx/source/users/rest.rst Wed Jun 30 07:36:53 2021 +0200 @@ -442,6 +442,33 @@ $ curl http://localhost:8042/studies/6b9e19d9-62094390-5f9ddb01-4a191ae7-9766b715/media > Study.zip +.. _download-pdf-videos: + +Downloading PDF or videos +^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. highlight:: bash + +Given a DICOM instance that embeds a PDF file (typically, one instance +whose SOP Class UID is ``1.2.840.10008.5.1.4.1.1.104.1`` - +Encapsulated PDF Storage), the PDF content can be downloaded as +follows:: + + $ curl http://localhost:8042/instances/1915e0cc-c2c1a0fc-12cdd7f5-3ba32114-a97c2c9b/content/0042,0011 > sample.pdf + +This corresponds to downloading the raw DICOM tag "Encapsulated +Document" (0042,0011). Beware that the last byte of the downloaded +file might correspond to one padding byte, if the source PDF had an +odd number of bytes. + +Similarly, if you know that a DICOM instance :ref:`embeds a video +` (which can be tested by checking the :ref:`value of the +metadata ` corresponding to its transfer syntax UID), +the raw video can be downloaded as follows:: + + $ curl http://localhost:8042/instances/e465dd27-83c96343-96848735-7035a133-1facf1a0/frames/0/raw > sample.mp4 + + .. _peering: Sending resources to remote Orthanc over HTTP/HTTPS (through Orthanc peering)