Mercurial > hg > orthanc-book
comparison Sphinx/source/faq/features.rst @ 660:a6e371768a70
dicom-as-json
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Apr 2021 12:41:31 +0200 |
parents | 187a18c6c646 |
children | 36bf58dfb7f7 |
comparison
equal
deleted
inserted
replaced
659:a37ac06ec2fc | 660:a6e371768a70 |
---|---|
219 User-defined attachments can be modified by issuing a HTTP PUT against | 219 User-defined attachments can be modified by issuing a HTTP PUT against |
220 the REST API:: | 220 the REST API:: |
221 | 221 |
222 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/attachments/samplePdf -X PUT --data-binary @sample.pdf | 222 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/attachments/samplePdf -X PUT --data-binary @sample.pdf |
223 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/attachments/sampleRaw -X PUT -d 'raw data' | 223 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/attachments/sampleRaw -X PUT -d 'raw data' |
224 | 224 |
225 | |
226 DICOM-as-JSON attachments | |
227 ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
228 | |
229 In the version of Orthanc <= 1.9.0, whenever Orthanc receives a DICOM | |
230 file, it pre-computes a JSON summary of its DICOM tags, and caches | |
231 this JSON file as an attachment to the DICOM instance (accessible at | |
232 the ``/instances/{...}/attachments/dicom-as-json/`` URI). This | |
233 attachment is used as a cache to seep up future accesses to | |
234 ``/instances/.../tags``, lookups using ``/tools/find`` or C-FIND | |
235 queries. | |
236 | |
237 This caching might cause issues if the dictionary of DICOM tags is | |
238 subsequently modified, which implies that the cached JSON file does | |
239 not perfectly match the new dictionary. | |
240 | |
241 .. highlight:: bash | |
242 | |
243 Since Orthanc 1.2.0, you can force the re-generation of the cached | |
244 JSON file by DELETE-ing it, for instance:: | |
245 | |
246 $ curl -X DELETE http://localhost:8042/instances/301896f2-1416807b-3e05dcce-ff4ce9bb-a6138832/attachments/dicom-as-json | |
247 | |
248 .. highlight:: text | |
249 | |
250 The next time you open this particular instance with Orthanc Explorer, | |
251 you will see messages in the Orthanc logs (in verbose mode) stating | |
252 that the Orthanc server has reconstructed the JSON summary, which will | |
253 match the new content of the dictionary:: | |
254 | |
255 I0222 08:56:00.923070 FilesystemStorage.cpp:155] Reading attachment "2309c47b-1cbd-4601-89b5-1be1ad80382c" of "DICOM" content type | |
256 I0222 08:56:00.923394 ServerContext.cpp:401] Reconstructing the missing DICOM-as-JSON summary for instance: 301896f2-1416807b-3e05dcce-ff4ce9bb-a6138832 | |
257 I0222 08:56:00.929117 ServerContext.cpp:540] Adding attachment dicom-as-json to resource 301896f2-1416807b-3e05dcce-ff4ce9bb-a6138832 | |
258 I0222 08:56:00.929425 FilesystemStorage.cpp:118] Creating attachment "3c830b66-8a00-42f0-aa3a-5e37b4a8b5a4" of "JSON summary of DICOM" type (size: 1MB) | |
259 | |
260 These DICOM-as-JSON attachments are not automatically generated | |
261 anymore starting with Orthanc 1.9.1. | |
262 | |
225 | 263 |
226 .. _registry: | 264 .. _registry: |
227 | 265 |
228 Central registry of metadata and attachments | 266 Central registry of metadata and attachments |
229 -------------------------------------------- | 267 -------------------------------------------- |