annotate Sphinx/source/users/storage-commitment.rst @ 993:05b106383b2a

migration to UCLouvain servers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 21 Nov 2023 21:39:40 +0100
parents 1316bc62b5d5
children
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
328
d39237f67df6 explicitly talk about DICOM storage commitment
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
3 DICOM storage commitment
d39237f67df6 explicitly talk about DICOM storage commitment
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
4 ========================
322
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
323
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
14 commitment, both as SCP and as SCU (i.e. both as a server and as a
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
15 client).
322
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 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
18 imaging modality "A" asks a remote imaging modality "B", whether "B"
323
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
19 accepts responsibility for having stored a set of DICOM instances.
322
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
323
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
25 ran fine, and thus "A" could decide to remove the images from its
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
26 local database. If "B" answers that there was an error, "A" could
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
27 decide to send the images again.
322
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
331
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
59 :width: 700px
322
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
323
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
74 file of Orthanc <configuration>`, through the ``DicomModalities``
322
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
323
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
79 As can be seen in the figure above, the storage commitment SCP of
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
80 Orthanc takes advantage of the :ref:`jobs engine <jobs>` that is
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
81 embedded within Orthanc. Whenever Orthanc receives a storage
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
82 commitment request, it internally creates a job with a dedicated type
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
83 (namely ``StorageCommitmentScp``). :ref:`This job can be controlled
322
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
331
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
90 .. _storage-commitment-scp-sample:
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
91
322
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 Sample usage
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
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 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
96 Orthanc from the command-line tool ``stgcmtscu``. This free and
323
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
97 open-source tool is part of the `dcm4che project
331
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
98 <https://www.dcm4che.org/>`__ and emulates the behavior of a storage
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
99 commitment SCU.
322
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 .. highlight:: json
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 Firstly, we define one DICOM modality corresponding to ``stgcmtscu``
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 by creating the following :ref:`configuration file <configuration>`
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 for Orthanc::
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 {
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 "DicomPort" : 4242,
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 "DicomModalities" : {
331
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
110 "scu" : [ "STGCMTSCU", "127.0.0.1", 11114 ]
322
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
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 .. highlight:: text
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 Secondly, we start Orthanc using the just-created configuration file::
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 $ ./Orthanc --verbose storage-commitment.json
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 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
122 "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
123
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 $ dcm2xml /tmp/DummyCT.dcm | grep -E '"SOPInstanceUID"|"SOPClassUID"'
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 <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
126 <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
127
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 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
129 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
130 ``stgcmtscu``::
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 $ /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
133 [...]
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 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
135 18:14:22,949 DEBUG - Dataset:
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 (0008,1195) UI [2.25.250402771220435242864082979068071491247] TransactionUID
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 (0008,1198) SQ [1 Items] FailedSOPSequence
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 >Item #1
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 >(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
140 >(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
141 >(0008,1197) US [274] FailureReason
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 (0008,1199) SQ [] ReferencedSOPSequence
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 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
145 are reported by the Orthanc SCP in the ``FailedSOPSequence`` field,
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 which indicates the fact that Orthanc has not stored this instance
323
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
147 yet. The ``FailureReason`` 274 corresponds to `status 0x0112
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
148 <http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.14.html#sect_C.14.1.1>`__,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
149 namely *"No such object instance"*.
322
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150
323
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
151 Fourthly, let's upload the sample file to Orthanc, then execute
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
152 ``stgcmtscu`` for a second time::
322
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 $ storescu localhost 4242 /tmp/DummyCT.dcm
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 $ /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
156 [...]
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 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
158 18:19:48,090 DEBUG - Dataset:
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 (0008,1195) UI [2.25.141864351815234988385597655400095444069] TransactionUID
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 (0008,1199) SQ [1 Items] ReferencedSOPSequence
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 >Item #1
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 >(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
163 >(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
164
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 The instance of interest is now reported in the
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 ``ReferencedSOPSequence`` tag, instead of ``FailedSOPSequence``. This
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 shows that Orthanc has properly received the sample instance.
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
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 Plugins
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 ^^^^^^^
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 The Orthanc core implements a basic storage commitment SCP. This basic
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 handler simply checks for the presence of the requested DICOM
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 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
177 UIDs do match those provided by the remote storage commitment SCU.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 For more advanced scenarios, it is possible to override this default
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 SCP to customize the way incoming storage commitment requests are
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 processed by Orthanc. This customization is done :ref:`by creating an
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 Orthanc plugin <creating-plugins>`.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 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
185 using the ``OrthancPluginRegisterStorageCommitmentScpCallback()``
993
05b106383b2a migration to UCLouvain servers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 991
diff changeset
186 function of the `plugin SDK <https://orthanc.uclouvain.be/sdk/>`__.
322
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 Importantly, this primitive frees the plugin developer from manually
323
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
189 creating the Orthanc jobs. One job is transparently created by the
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
190 Orthanc core for each incoming storage commitment request, allowing
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
191 the plugin developer to focus only on the processing of the queried
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 322
diff changeset
192 instances.
322
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 Note that a `sample plugin
991
1316bc62b5d5 migration to UCLouvain servers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 449
diff changeset
195 <https://orthanc.uclouvain.be/hg/orthanc/file/default/OrthancServer/Plugins/Samples/StorageCommitmentScp>`__
322
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196 is also available in the source distribution of Orthanc.
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197
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
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 .. _storage-commitment-scu:
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 Storage commitment SCU
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
331
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
205 As written above, Orthanc can act as a storage commitment SCP
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
206 (server). It can also act as a storage commitment SCU (client), which
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
207 is discussed in this section. Here is the corresponding workflow:
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
208
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
209 .. image:: ../images/StorageCommitmentSCU.svg
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
210 :align: center
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
211 :width: 700px
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
212
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
213 Note that depending on the type of long-term archive media (hard disk,
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
214 optical disk, tape, hard drive, cloud provider...), the storage
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
215 commitment report (DICOM command ``N-EVENT-REPORT``) may be sent long
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
216 time after Orthanc has sent its storage commitment request (DICOM
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
217 command ``N-ACTION``), which necessitates Orthanc to handle reports
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
218 asynchronously.
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
219
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
220 The active storage commitment reports are stored in RAM only, and are
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
221 lost if Orthanc is restarted. The :ref:`configuration option
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
222 <configuration>` ``StorageCommitmentReportsSize`` sets the limit on
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
223 the number of active storage commitment reports in order to avoid
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
224 infinite memory growth because of the asynchronous notifications (the
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
225 default limit is 100): The least recently used transactions are
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
226 removed first.
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
227
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
228
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
229 REST API
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
230 ^^^^^^^^
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
231
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
232 Overview
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
233 ........
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
234
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
235 As can be seen in the figure above, storage commitment SCU is governed
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
236 by 3 new routes that were introduced in the REST API of Orthanc 1.6.0:
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
237
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
238 * POST-ing to ``/modalities/{scp}/storage-commitment`` initiates
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
239 storage commitment requests. In this route, ``{scp}`` corresponds to
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
240 the symbolic name of a remote DICOM modality, as declared in the
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
241 ``DicomModalities`` :ref:`configuration option <configuration>` of
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
242 Orthanc.
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
243
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
244 * GET-ing on ``/storage-commitment/{transaction}`` retrieves the
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
245 status of a previous storage commitment request. In this route,
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
246 ``{transaction}`` corresponds to an identifier that is available in
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
247 the output of the call to ``/modalities/{scp}/storage-commitment``.
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
248
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
249 * POST-ing on ``/storage-commitment/{transaction}/remove`` asks
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
250 Orthanc to remove the instances that have been reported as
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
251 successfully stored by the remote SCP. This route is only available
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
252 for fully successful storage commitment reports.
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
253
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
254 In addition, the route ``/modalities/{scp}/store`` that is used to
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
255 :ref:`send one file from Orthanc to another modality
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
256 <rest-store-scu>`, accepts a new Boolean field
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
257 ``StorageCommitment``. If this field is set to ``true``, a storage
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
258 commitment SCU request is automatically issued by Orthanc after the
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
259 C-STORE operation succeeds.
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
260
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
261
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
262 .. _storage-commitment-scu-trigger:
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
263
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
264 Triggering storage commitment SCU
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
265 .................................
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
266
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
267 .. highlight:: json
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
268
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
269 We'll be using a sample configuration file that is almost :ref:`the
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
270 same as for the SCP samples <storage-commitment-scp-sample>`, but in
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
271 which we declare a remote SCP instead of a remote SCU (only the AET
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
272 changes)::
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
273
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
274 {
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
275 "DicomPort" : 4242,
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
276 "DicomModalities" : {
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
277 "scp" : [ "DCMQRSCP", "127.0.0.1", 11114 ]
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
278 }
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
279 }
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
280
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
281
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
282 .. highlight:: text
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
283
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
284 Given that configuration, here is how to trigger a storage commitment
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
285 SCU request against the remote SCP, asking whether a single DICOM
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
286 instance is properly stored remotely::
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
287
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
288 $ curl http://localhost:8042/modalities/scp/storage-commitment -X POST -d '{"DicomInstances": [ { "SOPClassUID" : "1.2.840.10008.5.1.4.1.1.4", "SOPInstanceUID" : "1.2.840.113619.2.176.2025.1499492.7040.1171286242.109" } ]}'
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
289 {
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
290 "ID" : "2.25.77313390743082158294121927935820988919",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
291 "Path" : "/storage-commitment/2.25.77313390743082158294121927935820988919"
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
292 }
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
293
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
294 The REST call returns with the identifier of a storage commitment
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
295 transaction that can successively be monitored by the external
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
296 application (see below). A shorthand notation exists as well, where
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
297 the JSON object containing the fields ``SOPClassUID`` and
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
298 ``SOPInstanceUID`` object is replaced by a JSON array containing these
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
299 two elements::
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
300
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
301 $ curl http://localhost:8042/modalities/scp/storage-commitment -X POST -d '{"DicomInstances": [ [ "1.2.840.10008.5.1.4.1.1.4", "1.2.840.113619.2.176.2025.1499492.7040.1171286242.109" ] ]}'
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
302
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
303 It is also possible to query the state of all the instances from DICOM
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
304 resources that are locally stored by the Orthanc server (these
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
305 resources can be patients, studies, series or instances). In such a
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
306 situation, one has to use the ``Resources`` field and provide a list
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
307 of :ref:`Orthanc identifiers <orthanc-ids>`::
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
308
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
309 $ curl http://localhost:8042/modalities/scp/storage-commitment -X POST -d '{"Resources": [ "b9c08539-26f93bde-c81ab0d7-bffaf2cb-a4d0bdd0" ]}'
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
310
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
311 Evidently, the call above accept a list of DICOM instances, not just a
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
312 single one (hence the enclosing JSON array).
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
313
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
314
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
315 Chaining C-STORE with storage commitment
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
316 ........................................
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
317
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
318 Often, C-STORE SCU and storage commitment SCU requests are chained:
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
319 The images are sent, then storage commitment is used to check whether
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
320 all the images have all properly been received. This chaining can be
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
321 automatically done by setting the ``StorageCommitment`` field in the
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
322 :ref:`corresponding call to the REST API <rest-store-scu>`::
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
323
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
324 $ curl http://localhost:8042/modalities/scp/store -X POST -d '{"StorageCommitment":true, "Resources": [ "b9c08539-26f93bde-c81ab0d7-bffaf2cb-a4d0bdd0" ]}'
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
325 {
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
326 "Description" : "REST API",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
327 "FailedInstancesCount" : 0,
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
328 "InstancesCount" : 1,
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
329 "LocalAet" : "ORTHANC",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
330 "ParentResources" : [ "b9c08539-26f93bde-c81ab0d7-bffaf2cb-a4d0bdd0" ],
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
331 "RemoteAet" : "ORTHANC",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
332 "StorageCommitmentTransactionUID" : "2.25.300965561481187126241492642575174449473"
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
333 }
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
334
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
335 Note that the identifier of the storage commitment transaction is part
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
336 of the answer. It can be used to inspect the storage commitment report
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
337 (see below).
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
338
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
339
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
340 Inspecting the report
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
341 .....................
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
342
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
343 Given the ID of one storage commitment transaction, one can monitor
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
344 the status of the report::
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
345
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
346 $ curl http://localhost:8042/storage-commitment/2.25.77313390743082158294121927935820988919
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
347 {
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
348 "RemoteAET" : "ORTHANC",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
349 "Status" : "Pending"
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
350 }
322
c5226c5509ca storage commitment scp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
351
331
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
352 The ``Status`` field can have three different values:
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
353
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
354 * ``Pending`` indicates that Orthanc is still waiting for the response
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
355 from the remote storage commitment SCP.
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
356 * ``Success`` indicates that the remote SCP commits to having properly
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
357 stored all the requested instances.
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
358 * ``Failure`` indicates that the remote SCP has not properly stored at
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
359 least one of the requested instances.
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
360
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
361 After waiting for some time, the report becomes available::
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
362
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
363 $ curl http://localhost:8042/storage-commitment/2.25.77313390743082158294121927935820988919
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
364 {
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
365 "Failures" : [
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
366 {
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
367 "Description" : "One or more of the elements in the Referenced SOP Instance Sequence was not available",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
368 "FailureReason" : 274,
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
369 "SOPClassUID" : "1.2.840.10008.5.1.4.1.1.4",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
370 "SOPInstanceUID" : "1.2.840.113619.2.176.2025.1499492.7040.1171286242.109"
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
371 }
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
372 ],
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
373 "RemoteAET" : "ORTHANC",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
374 "Status" : "Failure",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
375 "Success" : []
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
376 }
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
377
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
378 This call shows that the remote SCP had not received the requested
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
379 instance. Here the result of another storage commitment request after
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
380 having sent the same instance of interest::
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
381
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
382 $ curl http://localhost:8042/storage-commitment/2.25.332757466317867686107317231615319266620
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
383 {
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
384 "Failures" : [],
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
385 "RemoteAET" : "ORTHANC",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
386 "Status" : "Success",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
387 "Success" : [
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
388 {
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
389 "SOPClassUID" : "1.2.840.10008.5.1.4.1.1.4",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
390 "SOPInstanceUID" : "1.2.840.113619.2.176.2025.1499492.7040.1171286242.109"
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
391 }
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
392 ]
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
393 }
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
394
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
395
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
396 Removing the instances
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
397 ......................
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
398
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
399 If the ``Status`` field of the report equals ``Success``, it is then
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
400 possible to remove the instances from the Orthanc database through a
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
401 single call to the REST API::
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
402
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
403 $ curl http://localhost:8042/storage-commitment/2.25.332757466317867686107317231615319266620/remove -X POST -d ''
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
404 {}
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
405
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
406
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
407 Plugins
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
408 ^^^^^^^
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
409
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
410 Thanks to the fact that Orthanc plugins have full access to the REST
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
411 API of Orthanc, plugins can easily trigger storage commitment SCU
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
412 requests as if they were external applications, by calling the
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
413 functions ``OrthancPluginRestApiPost()`` and
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
414 ``OrthancPluginRestApiGet()``.
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
415
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
416
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
417 Testing against dcm4che
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
418 ^^^^^^^^^^^^^^^^^^^^^^^
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
419
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
420 As explained :ref:`in a earlier section about SCP
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
421 <storage-commitment-scp-sample>`, the dcm4che project proposes
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
422 command-line tools to emulate the behavior of a storage commitment SCU
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
423 and SCP. The emulation tool for the SCP part is called ``dcmqrscp``.
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
424 This section gives instructions to test Orthanc against ``dcmqrscp``.
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
425
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
426 Let's start Orthanc with an empty database and the configuration file
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
427 we used :ref:`when describing the REST API for the SCU
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
428 <storage-commitment-scu-trigger>`::
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
429
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
430 $ ./Orthanc --verbose storage-commitment.json
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
431
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
432 In another terminal, let's upload a sample image to Orthanc, generate
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
433 a DICOMDIR from it (as the tool ``dcmqrscp`` works with a DICOMDIR
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
434 media), and start ``dcmqrscp``::
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
435
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
436 $ storescu localhost 4242 /tmp/DummyCT.dcm
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
437 $ curl http://localhost:8042/studies/b9c08539-26f93bde-c81ab0d7-bffaf2cb-a4d0bdd0/media > /tmp/DummyCT.zip
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
438 $ mkdir /tmp/dcmqrscp
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
439 $ cd /tmp/dcmqrscp
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
440 $ unzip /tmp/DummyCT.zip
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
441 $ /home/jodogne/Downloads/dcm4che-5.20.0/bin/dcmqrscp -b DCMQRSCP:11114 --dicomdir /tmp/dcmqrscp/DICOMDIR
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
442 15:20:09,476 INFO - Start TCP Listener on 0.0.0.0/0.0.0.0:11114
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
443
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
444 In a third terminal, we ask Orthanc to send a storage commitment
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
445 request to ``dcmqrscp`` about the study (that is now both stored by
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
446 Orthanc and by ``dcmqrscp``)::
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
447
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
448 $ curl http://localhost:8042/modalities/scp/storage-commitment -X POST -d '{"Resources":["b9c08539-26f93bde-c81ab0d7-bffaf2cb-a4d0bdd0"]}'
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
449 {
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
450 "ID" : "2.25.335431924334468284852143921743736408673",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
451 "Path" : "/storage-commitment/2.25.335431924334468284852143921743736408673"
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
452 }
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
453 $ curl http://localhost:8042/storage-commitment/2.25.335431924334468284852143921743736408673
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
454 {
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
455 "Failures" : [],
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
456 "RemoteAET" : "DCMQRSCP",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
457 "Status" : "Success",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
458 "Success" : [
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
459 {
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
460 "SOPClassUID" : "1.2.840.10008.5.1.4.1.1.4",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
461 "SOPInstanceUID" : "1.2.840.113619.2.176.2025.1499492.7040.1171286242.109"
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
462 }
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
463 ]
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
464 }
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
465
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
466 As can be seen, ``dcmqrscp`` reports that it knows about the
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
467 study. Let us now create another instance in the same study by
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
468 :ref:`running a modification <study-modification>` through the REST
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
469 API of Orthanc, then check that ``dcmqrscp`` doesn't know about this
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
470 modified study::
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
471
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
472 $ curl http://localhost:8042/studies/b9c08539-26f93bde-c81ab0d7-bffaf2cb-a4d0bdd0/modify -X POST -d '{"Replace":{"StudyDescription":"TEST"}}'
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
473 {
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
474 "ID" : "0b57dfc8-edb5f4c7-78f8bcdc-546908dc-b79b06f4",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
475 "Path" : "/studies/0b57dfc8-edb5f4c7-78f8bcdc-546908dc-b79b06f4",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
476 "PatientID" : "6816cb19-844d5aee-85245eba-28e841e6-2414fae2",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
477 "Type" : "Study"
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
478 }
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
479 $ curl http://localhost:8042/modalities/scp/storage-commitment -X POST -d '{"Resources":["0b57dfc8-edb5f4c7-78f8bcdc-546908dc-b79b06f4"]}'
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
480 {
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
481 "ID" : "2.25.12626723691916447325628593043115134307",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
482 "Path" : "/storage-commitment/2.25.12626723691916447325628593043115134307"
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
483 }
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
484 $ curl http://localhost:8042/storage-commitment/2.25.12626723691916447325628593043115134307
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
485 {
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
486 "Failures" : [
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
487 {
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
488 "Description" : "One or more of the elements in the Referenced SOP Instance Sequence was not available",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
489 "FailureReason" : 274,
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
490 "SOPClassUID" : "1.2.840.10008.5.1.4.1.1.4",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
491 "SOPInstanceUID" : "1.2.276.0.7230010.3.1.4.8323329.16403.1583936918.190455"
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
492 }
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
493 ],
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
494 "RemoteAET" : "DCMQRSCP",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
495 "Status" : "Failure",
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
496 "Success" : []
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
497 }
48673b8abae3 documentation of storage commitment scu
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
498