annotate Sphinx/source/users/storage-commitment.rst @ 322:c5226c5509ca

storage commitment scp
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 27 Feb 2020 18:29:09 +0100
parents
children e2a20f30b9a3 d39237f67df6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
322
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 .. _storage-commitment:
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 Storage commitment
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 ==================
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 .. contents::
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 :depth: 3
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 Introduction
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 ------------
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 Starting with **release 1.6.0**, Orthanc implements DICOM storage
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 commitment, both as an SCP and as a SCU.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 Storage commitment is a feature of the DICOM standard by which an
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 imaging modality "A" asks a remote imaging modality "B", whether "B"
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 accepts responsibility for having stored the images "A" has sent to
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 it.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 Typically, a storage commitment request is issued by "A" after "A" has
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 sent images to "B" using the :ref:`DICOM C-STORE command
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 <dicom-store>`. If "B" answers that all the images have been properly
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 received, the modality "A" has the guarantee that the C-STORE commands
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 ran fine, and thus "A" might decide to remove the images from its
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 database. If "B" answers that there was an error, "A" might decide to
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 send the images again.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 For more technical information, one may refer to the storage
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 commitment `Information Object Definition
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 <http://dicom.nema.org/medical/dicom/2019e/output/html/part03.html#sect_B.15>`__
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 and `Service Class
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 <http://dicom.nema.org/medical/dicom/2019e/output/html/part04.html#chapter_J>`__
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 in the DICOM standard. Orthanc follows the objective of the IHE
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 Technical Framework regarding the `Storage Commitment transaction
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 (RAD-10)
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 <https://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Vol2.pdf#page=160>`__. Following
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 this IHE specification, Orthanc only implements the **Storage
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 Commitment Push Model SOP Class**, both as an SCU ("Evidence Creator")
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 and as an SCP ("Image Manager").
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 Orthanc makes the assumption that the storage commitment responses are
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 sent **asynchronously**, which corresponds to most implementations of
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 storage commitment.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 .. _storage-commitment-scp:
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 Storage commitment SCP
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 ----------------------
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 Overview
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 ^^^^^^^^
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 Here is a diagram that outlines how storage commitment works in Orthanc:
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 .. image:: ../images/StorageCommitmentSCP.svg
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 :align: center
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 :width: 650px
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 | In this sequence, three DICOM associations are used: The first one
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 is the usual command to send the DICOM images from some SCU to the
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 Orthanc SCP (:ref:`C-STORE <dicom-store>`), the second association
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 is the one by which the SCU asks the Orthanc SCP to process a
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 storage commitment request (the SCU provides a list of DICOM
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 instances to be checked by specifying their SOP instance UID and
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 their SOP class UID), and the third one is the storage commitment
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 response coming from the Orthanc SCP. The response is sent
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 asynchronously from the Orthanc SCP to the SCU, once the storage
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 commitment request has been processed by Orthanc.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 The list of the DICOM modalities from which Orthanc accepts incoming
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 storage commitment requests is specified in the :ref:`configuration
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 file of Orthanc <configuration>`, by the ``DicomModalities``
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 option. It is possible to disable storage commitment for selected
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 modalities by setting their dedicated Boolean permission flag
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 ``AllowStorageCommitment`` to ``false``.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 As can be seen, the storage commitment SCP of Orthanc also takes
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 advantage of the :ref:`jobs engine <jobs>` that is embedded within
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 Orthanc. Whenever Orthanc receives a storage commitment request, it
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 internally creates a job with a dedicated type (namely
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 ``StorageCommitmentScp``). :ref:`This job can be controlled
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 <jobs-monitoring>` using the REST API of Orthanc, just like any other
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 job. As a consequence, an external software is able to monitor, cancel
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 or pause incoming storage commitment requests, by inspecting the list
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 of jobs whose type is ``StorageCommitmentScp``.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 Sample usage
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 ^^^^^^^^^^^^
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 In this section, we show how to query the storage commitment SCP of
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 Orthanc from the command-line tool ``stgcmtscu``. This free and
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 open-source tool originates from the `dcm4che project
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 <https://www.dcm4che.org/>`__ and simulates a basic storage commitment
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 SCU.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 .. highlight:: json
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 Firstly, we define one DICOM modality corresponding to ``stgcmtscu``
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 by creating the following :ref:`configuration file <configuration>`
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 for Orthanc::
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 {
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 "DicomPort" : 4242,
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 "DicomModalities" : {
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 "storage-commitment" : [ "STGCMTSCU", "127.0.0.1", 11114 ]
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 }
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 }
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 .. highlight:: text
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 Secondly, we start Orthanc using the just-created configuration file::
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 $ ./Orthanc --verbose storage-commitment.json
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 We'll be using some sample file ``/tmp/DummyCT.dcm``, whose DICOM tags
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 "SOP instance UID" and "SOP class UID" can be retrieved as follows::
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 $ dcm2xml /tmp/DummyCT.dcm | grep -E '"SOPInstanceUID"|"SOPClassUID"'
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 <element tag="0008,0016" vr="UI" vm="1" len="26" name="SOPClassUID">1.2.840.10008.5.1.4.1.1.4</element>
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 <element tag="0008,0018" vr="UI" vm="1" len="54" name="SOPInstanceUID">1.2.840.113619.2.176.2025.1499492.7040.1171286242.109</element>
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 Thirdly, we use ``stgcmtscu`` to get the status of one sample DICOM
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 file. Here is what can be read at the end of the logs of
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 ``stgcmtscu``::
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 $ /home/jodogne/Downloads/dcm4che-5.20.0/bin/stgcmtscu -b STGCMTSCU:11114 -c ORTHANC@localhost:4242 /tmp/DummyCT.dcm
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 [...]
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 18:14:22,949 DEBUG - STGCMTSCU<-ORTHANC(2) >> 1:N-EVENT-REPORT-RQ Dataset receiving...
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 18:14:22,949 DEBUG - Dataset:
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 (0008,1195) UI [2.25.250402771220435242864082979068071491247] TransactionUID
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 (0008,1198) SQ [1 Items] FailedSOPSequence
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 >Item #1
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 >(0008,1150) UI [1.2.840.10008.5.1.4.1.1.4] ReferencedSOPClassUID
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 >(0008,1155) UI [1.2.840.113619.2.176.2025.1499492.7040.1171286242.109] ReferencedSOPInstanceUID
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 >(0008,1197) US [274] FailureReason
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 (0008,1199) SQ [] ReferencedSOPSequence
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 As can be seen, the SOP class/instance UIDs of ``/tmp/DummyCT.dcm``
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 are reported by the Orthanc SCP in the ``FailedSOPSequence`` field,
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 which indicates the fact that Orthanc has not stored this instance
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 yet. The ``FailureReason`` 274 corresponds to status 0x0112, namely
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 "No such object instance".
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 Fourthly, let's upload the sample file, then execute ``stgcmtscu`` a
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 second time::
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 $ storescu localhost 4242 /tmp/DummyCT.dcm
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 $ /home/jodogne/Downloads/dcm4che-5.20.0/bin/stgcmtscu -b STGCMTSCU:11114 -c ORTHANC@localhost:4242 /tmp/DummyCT.dcm
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 [...]
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 18:19:48,090 DEBUG - STGCMTSCU<-ORTHANC(2) >> 1:N-EVENT-REPORT-RQ Dataset receiving...
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 18:19:48,090 DEBUG - Dataset:
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 (0008,1195) UI [2.25.141864351815234988385597655400095444069] TransactionUID
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 (0008,1199) SQ [1 Items] ReferencedSOPSequence
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 >Item #1
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 >(0008,1150) UI [1.2.840.10008.5.1.4.1.1.4] ReferencedSOPClassUID
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 >(0008,1155) UI [1.2.840.113619.2.176.2025.1499492.7040.1171286242.109] ReferencedSOPInstanceUID
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 The instance of interest is now reported in the
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 ``ReferencedSOPSequence`` tag, instead of ``FailedSOPSequence``. This
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 shows that Orthanc has properly received the sample instance.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 Plugins
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 ^^^^^^^
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 The Orthanc core implements a basic storage commitment SCP. This basic
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 handler simply checks for the presence of the requested DICOM
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 instances in the Orthanc database, and makes sure that their SOP class
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 UIDs do match those provided by the remote storage commitment SCU.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 For more advanced scenarios, it is possible to override this default
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 SCP to customize the way incoming storage commitment requests are
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 processed by Orthanc. This customization is done :ref:`by creating an
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 Orthanc plugin <creating-plugins>`.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 The custom storage commitment SCP is installed in the Orthanc core by
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 using the ``OrthancPluginRegisterStorageCommitmentScpCallback()``
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 function of the `plugin SDK <http://sdk.orthanc-server.com/>`__.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 Importantly, this primitive frees the plugin developer from manually
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 creating the Orthanc jobs. One job is automatically created for each
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 incoming storage commitment request by the Orthanc core, allowing the
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 developer to focus only on the processing of the queried instances.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 Note that a `sample plugin
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192 <https://bitbucket.org/sjodogne/orthanc/src/storage-commitment/Plugins/Samples/StorageCommitmentScp/>`__
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 is also available in the source distribution of Orthanc.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197 .. _storage-commitment-scu:
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199 Storage commitment SCU
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 ----------------------
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 *Work in progress*
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 *Sample using dcmqrscp*