Mercurial > hg > orthanc-book
comparison Sphinx/source/users/storage-commitment.rst @ 323:e2a20f30b9a3
typos
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 28 Feb 2020 14:19:19 +0100 |
parents | c5226c5509ca |
children | 117be48706ba |
comparison
equal
deleted
inserted
replaced
322:c5226c5509ca | 323:e2a20f30b9a3 |
---|---|
9 | 9 |
10 Introduction | 10 Introduction |
11 ------------ | 11 ------------ |
12 | 12 |
13 Starting with **release 1.6.0**, Orthanc implements DICOM storage | 13 Starting with **release 1.6.0**, Orthanc implements DICOM storage |
14 commitment, both as an SCP and as a SCU. | 14 commitment, both as SCP and as SCU (i.e. both as a server and as a |
15 client). | |
15 | 16 |
16 Storage commitment is a feature of the DICOM standard by which an | 17 Storage commitment is a feature of the DICOM standard by which an |
17 imaging modality "A" asks a remote imaging modality "B", whether "B" | 18 imaging modality "A" asks a remote imaging modality "B", whether "B" |
18 accepts responsibility for having stored the images "A" has sent to | 19 accepts responsibility for having stored a set of DICOM instances. |
19 it. | |
20 | 20 |
21 Typically, a storage commitment request is issued by "A" after "A" has | 21 Typically, a storage commitment request is issued by "A" after "A" has |
22 sent images to "B" using the :ref:`DICOM C-STORE command | 22 sent images to "B" using the :ref:`DICOM C-STORE command |
23 <dicom-store>`. If "B" answers that all the images have been properly | 23 <dicom-store>`. If "B" answers that all the images have been properly |
24 received, the modality "A" has the guarantee that the C-STORE commands | 24 received, the modality "A" has the guarantee that the C-STORE commands |
25 ran fine, and thus "A" might decide to remove the images from its | 25 ran fine, and thus "A" could decide to remove the images from its |
26 database. If "B" answers that there was an error, "A" might decide to | 26 local database. If "B" answers that there was an error, "A" could |
27 send the images again. | 27 decide to send the images again. |
28 | 28 |
29 For more technical information, one may refer to the storage | 29 For more technical information, one may refer to the storage |
30 commitment `Information Object Definition | 30 commitment `Information Object Definition |
31 <http://dicom.nema.org/medical/dicom/2019e/output/html/part03.html#sect_B.15>`__ | 31 <http://dicom.nema.org/medical/dicom/2019e/output/html/part03.html#sect_B.15>`__ |
32 and `Service Class | 32 and `Service Class |
69 asynchronously from the Orthanc SCP to the SCU, once the storage | 69 asynchronously from the Orthanc SCP to the SCU, once the storage |
70 commitment request has been processed by Orthanc. | 70 commitment request has been processed by Orthanc. |
71 | 71 |
72 The list of the DICOM modalities from which Orthanc accepts incoming | 72 The list of the DICOM modalities from which Orthanc accepts incoming |
73 storage commitment requests is specified in the :ref:`configuration | 73 storage commitment requests is specified in the :ref:`configuration |
74 file of Orthanc <configuration>`, by the ``DicomModalities`` | 74 file of Orthanc <configuration>`, through the ``DicomModalities`` |
75 option. It is possible to disable storage commitment for selected | 75 option. It is possible to disable storage commitment for selected |
76 modalities by setting their dedicated Boolean permission flag | 76 modalities by setting their dedicated Boolean permission flag |
77 ``AllowStorageCommitment`` to ``false``. | 77 ``AllowStorageCommitment`` to ``false``. |
78 | 78 |
79 As can be seen, the storage commitment SCP of Orthanc also takes | 79 As can be seen in the figure above, the storage commitment SCP of |
80 advantage of the :ref:`jobs engine <jobs>` that is embedded within | 80 Orthanc takes advantage of the :ref:`jobs engine <jobs>` that is |
81 Orthanc. Whenever Orthanc receives a storage commitment request, it | 81 embedded within Orthanc. Whenever Orthanc receives a storage |
82 internally creates a job with a dedicated type (namely | 82 commitment request, it internally creates a job with a dedicated type |
83 ``StorageCommitmentScp``). :ref:`This job can be controlled | 83 (namely ``StorageCommitmentScp``). :ref:`This job can be controlled |
84 <jobs-monitoring>` using the REST API of Orthanc, just like any other | 84 <jobs-monitoring>` using the REST API of Orthanc, just like any other |
85 job. As a consequence, an external software is able to monitor, cancel | 85 job. As a consequence, an external software is able to monitor, cancel |
86 or pause incoming storage commitment requests, by inspecting the list | 86 or pause incoming storage commitment requests, by inspecting the list |
87 of jobs whose type is ``StorageCommitmentScp``. | 87 of jobs whose type is ``StorageCommitmentScp``. |
88 | 88 |
89 | 89 |
90 | |
91 Sample usage | 90 Sample usage |
92 ^^^^^^^^^^^^ | 91 ^^^^^^^^^^^^ |
93 | 92 |
94 In this section, we show how to query the storage commitment SCP of | 93 In this section, we show how to query the storage commitment SCP of |
95 Orthanc from the command-line tool ``stgcmtscu``. This free and | 94 Orthanc from the command-line tool ``stgcmtscu``. This free and |
96 open-source tool originates from the `dcm4che project | 95 open-source tool is part of the `dcm4che project |
97 <https://www.dcm4che.org/>`__ and simulates a basic storage commitment | 96 <https://www.dcm4che.org/>`__ and simulates a basic storage commitment |
98 SCU. | 97 SCU. |
99 | 98 |
100 .. highlight:: json | 99 .. highlight:: json |
101 | 100 |
141 (0008,1199) SQ [] ReferencedSOPSequence | 140 (0008,1199) SQ [] ReferencedSOPSequence |
142 | 141 |
143 As can be seen, the SOP class/instance UIDs of ``/tmp/DummyCT.dcm`` | 142 As can be seen, the SOP class/instance UIDs of ``/tmp/DummyCT.dcm`` |
144 are reported by the Orthanc SCP in the ``FailedSOPSequence`` field, | 143 are reported by the Orthanc SCP in the ``FailedSOPSequence`` field, |
145 which indicates the fact that Orthanc has not stored this instance | 144 which indicates the fact that Orthanc has not stored this instance |
146 yet. The ``FailureReason`` 274 corresponds to status 0x0112, namely | 145 yet. The ``FailureReason`` 274 corresponds to `status 0x0112 |
147 "No such object instance". | 146 <http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.14.html#sect_C.14.1.1>`__, |
148 | 147 namely *"No such object instance"*. |
149 Fourthly, let's upload the sample file, then execute ``stgcmtscu`` a | 148 |
150 second time:: | 149 Fourthly, let's upload the sample file to Orthanc, then execute |
150 ``stgcmtscu`` for a second time:: | |
151 | 151 |
152 $ storescu localhost 4242 /tmp/DummyCT.dcm | 152 $ storescu localhost 4242 /tmp/DummyCT.dcm |
153 $ /home/jodogne/Downloads/dcm4che-5.20.0/bin/stgcmtscu -b STGCMTSCU:11114 -c ORTHANC@localhost:4242 /tmp/DummyCT.dcm | 153 $ /home/jodogne/Downloads/dcm4che-5.20.0/bin/stgcmtscu -b STGCMTSCU:11114 -c ORTHANC@localhost:4242 /tmp/DummyCT.dcm |
154 [...] | 154 [...] |
155 18:19:48,090 DEBUG - STGCMTSCU<-ORTHANC(2) >> 1:N-EVENT-REPORT-RQ Dataset receiving... | 155 18:19:48,090 DEBUG - STGCMTSCU<-ORTHANC(2) >> 1:N-EVENT-REPORT-RQ Dataset receiving... |
182 The custom storage commitment SCP is installed in the Orthanc core by | 182 The custom storage commitment SCP is installed in the Orthanc core by |
183 using the ``OrthancPluginRegisterStorageCommitmentScpCallback()`` | 183 using the ``OrthancPluginRegisterStorageCommitmentScpCallback()`` |
184 function of the `plugin SDK <http://sdk.orthanc-server.com/>`__. | 184 function of the `plugin SDK <http://sdk.orthanc-server.com/>`__. |
185 | 185 |
186 Importantly, this primitive frees the plugin developer from manually | 186 Importantly, this primitive frees the plugin developer from manually |
187 creating the Orthanc jobs. One job is automatically created for each | 187 creating the Orthanc jobs. One job is transparently created by the |
188 incoming storage commitment request by the Orthanc core, allowing the | 188 Orthanc core for each incoming storage commitment request, allowing |
189 developer to focus only on the processing of the queried instances. | 189 the plugin developer to focus only on the processing of the queried |
190 instances. | |
190 | 191 |
191 Note that a `sample plugin | 192 Note that a `sample plugin |
192 <https://bitbucket.org/sjodogne/orthanc/src/storage-commitment/Plugins/Samples/StorageCommitmentScp/>`__ | 193 <https://bitbucket.org/sjodogne/orthanc/src/storage-commitment/Plugins/Samples/StorageCommitmentScp/>`__ |
193 is also available in the source distribution of Orthanc. | 194 is also available in the source distribution of Orthanc. |
194 | 195 |