# HG changeset patch # User Sebastien Jodogne # Date 1584002060 -3600 # Node ID 7b093bebb5620e6e7edbc522d97f89efcab396ce # Parent 48673b8abae369e885357cfc1761b63265473f95 storescu trick diff -r 48673b8abae3 -r 7b093bebb562 Sphinx/source/faq.rst --- a/Sphinx/source/faq.rst Wed Mar 11 15:32:21 2020 +0100 +++ b/Sphinx/source/faq.rst Thu Mar 12 09:34:20 2020 +0100 @@ -57,4 +57,5 @@ faq/authentication.rst faq/crash.rst faq/transcoding.rst + faq/dcmtk-tricks.rst faq/why-orthanc.rst diff -r 48673b8abae3 -r 7b093bebb562 Sphinx/source/faq/dcmtk-tricks.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sphinx/source/faq/dcmtk-tricks.rst Thu Mar 12 09:34:20 2020 +0100 @@ -0,0 +1,61 @@ +.. _dcmtk-tricks: + +Some tricks with DCMTK +====================== + +.. contents:: + :depth: 3 + +Sending uncommon or recent SOP class UIDs +----------------------------------------- + +On many systems, the ``storescu`` command from the `DCMTK project +`__ is not configured +out-of-the-box to send uncommon/recent SOP class UIDs or transfer +syntaxes. You might have to fine-tune the default configuration file +of ``storescu`` in order to be able to send e.g. MPEG4 videos or +breast tomosynthesis images. + +.. highlight:: text + +For instance, here is the result of sending one MPEG4 video on a +Ubuntu 18.04 box:: + + $ storescu localhost 4242 XC000000.dcm + E: No presentation context for: (VVp) 1.2.840.10008.5.1.4.1.1.77.1.4.1 + E: Store SCU Failed: 0006:0208 DIMSE No valid Presentation Context ID + +This error message is unrelated to Orthanc (especially if you have set +the :ref:`configuration option ` +``UnknownSopClassAccepted`` to ``true``). To properly adapt the +configuration file, first determine the DICOM tag ``SOPClassUID`` () +and the transfer syntax of the file, which can be done by using the +``dcm2xml`` command-line tool:: + + $ dcm2xml XC000000.dcm | grep -E 'data-set xfer|"SOPClassUID"' + + 1.2.840.10008.5.1.4.1.1.77.1.4.1 + +Secondly, create a copy of the default ``storescu.cfg`` configuration +file, e.g. on Ubuntu 18.04:: + + $ cp /etc/dcmtk/storescu.cfg /tmp/storescu.cfg + +Edit this file so as to replace one of the 128 preconfigured +presentation contexts, using this information:: + + $ diff /etc/dcmtk/storescu.cfg storescu.cfg + 198c198 + < PresentationContext128 = VideoPhotographicImageStorage\MPEG2 + --- + > PresentationContext128 = 1.2.840.10008.5.1.4.1.1.77.1.4.1\MPEG4 + +Obviously, you can replace more predefinitions if other pairs of SOP +class UID and transfer syntax are needed. Finally, run ``storescu`` +using this new configuration:: + + $ storescu -xf /tmp/storescu.cfg Default localhost 4242 XC000000.dcm + +Note that the ``storescu`` command from the `dcm4che project +`__ might be more easy to use in such +situations.