annotate Sphinx/source/faq/features.rst @ 632:38face2a84a4

metadata are utf-8 strings
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 16 Apr 2021 18:54:36 +0200
parents debcf6b6d070
children a76d83a00c68
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 Terminology of advanced features
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 ================================
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3
224
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 218
diff changeset
4 .. contents::
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 218
diff changeset
5 :depth: 3
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 218
diff changeset
6
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 .. _peers:
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 Peers
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 -----
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 An "Orthanc peer" is another instance of Orthanc, possibly running on
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 a remote computer.
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 Contrarily to a "modality", it is possible to communicate with a peer
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 through the **HTTP/HTTPS protocol** (i.e. through the REST API of
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 Orthanc), and not through the DICOM protocol. This implies a much
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 easier configuration: It is only required to know the URL, the
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 username and the password to communicate with an Orthanc peer. This
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 contrasts with DICOM query/retrieve, that is quite complex and that
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 involves a lot of pitfalls (cf. the FAQ entry about :ref:`troubleshooting
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 DICOM communications <dicom>`) that can be bypassed if using HTTP.
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 Furthermore, as HTTP(S) communications are generally not blocked by
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 firewalls (contrarily to the DICOM protocol that is inherently an
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 Intranet protocol and that often requires the setup of VPN tunnels),
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 it is much easier to setup communications of medical images through
218
amazy
parents: 170
diff changeset
28 the Internet with :ref:`Orthanc peers <peering>`.
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 .. _recycling:
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 Recycling/Protection
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 --------------------
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 Because of its focus on low-end computers, Orthanc implements **disk
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 space recycling**: The patient that has been stored for the longest
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 time inside Orthanc can be automatically deleted when the disk space
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 used by Orthanc grows above a threshold, or when the number of stored
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 patients grows above a threshold. This feature enables the automated
278
9bf644571511 fix doc wrt recycling order
amazy
parents: 224
diff changeset
41 control of the disk space dedicated to Orthanc. Note that each time
9bf644571511 fix doc wrt recycling order
amazy
parents: 224
diff changeset
42 a new instance is received for an existing patient, the patient will
9bf644571511 fix doc wrt recycling order
amazy
parents: 224
diff changeset
43 be marked as the most recent one in the recycling order.
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 Recycling is controlled by the ``MaximumStorageSize`` and the
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 ``MaximumPatientCount`` options in the :ref:`Orthanc configuration
106
7063afe5748c added info about recycling
amazy
parents: 95
diff changeset
47 file <configuration>`. Setting both these values to 0 will disable
7063afe5748c added info about recycling
amazy
parents: 95
diff changeset
48 recycling.
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 It is possible to prevent important data from being automatically
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 recycled. This mechanism is called **protection**. Each patient can be
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 individually protected against recycling by using the
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 ``Unprotected/Protected`` switch that is available from Orthanc
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 Explorer.
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 Note that protection is only available at the patient level. It
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 protects all the studies/series/instances of the patient against
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 recycling. The rationale is that we think it is important to keep
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 available all the data related to one patient. Unwillingly losing a
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 study/series that is part of the same patient might lead to a loss in
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 consistency with respect to the medical history of this patient.
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 .. _compression:
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 Compression
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 -----------
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 If your disk space is limited, besides :ref:`recycling`, you should
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 also consider using **disk space compression**. When compression is
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 enabled, Orthanc compresses the incoming DICOM instances on-the-fly
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 before writing them to the filesystem, using `zlib
25
669ea65ba7fb fix links
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
72 <https://en.wikipedia.org/wiki/Zlib>`_. This is useful, because the
0
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 images are often stored as raw, uncompressed arrays in DICOM
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 instances: The size of a typical DICOM instance can hopefully be
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 divided by a factor 2 through lossless compression. This compression
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 process is transparent to the user, as Orthanc automatically
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 decompresses the file before sending it back to the external world.
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 Compression is controlled by the ``StorageCompression`` option in the
901e8961f46e initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 :ref:`Orthanc configuration file <configuration>`.
78
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
81
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
82
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
83 .. _metadata:
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
84
92
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
85 Metadata & attachments
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
86 ----------------------
78
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
87
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
88 Metadata consists in an **associative key-value array** (mapping a
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
89 integer key in the range [0,65535] to a string value) that is
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
90 associated with each :ref:`DICOM resource <orthanc-ids>` stored inside
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
91 Orthanc (may it be a patient, a study, a series or a DICOM
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
92 instance). Metadata can be either referred to using the integer key,
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
93 or using a symbolic name (if configured). Metadata records
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
94 information that is not readily available in the DICOM tags.
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
95
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
96 In spirit, the metadata mechanism is similar to the :ref:`attachment
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
97 mechanism <orthanc-storage>`. However, metadata is stored directly
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
98 inside the database, whereas attachments are stored as separate files
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
99 on the filesystem (the database only stores a reference to the
632
38face2a84a4 metadata are utf-8 strings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 622
diff changeset
100 attachments). Choosing between metadata and attachments is most often
38face2a84a4 metadata are utf-8 strings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 622
diff changeset
101 a matter of trade-off: Metadata must be kept small (as a rule of
38face2a84a4 metadata are utf-8 strings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 622
diff changeset
102 thumb, under 1KB) and used if fast access is needed, whereas
38face2a84a4 metadata are utf-8 strings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 622
diff changeset
103 attachments can be used to store arbitrarily large piece of data.
38face2a84a4 metadata are utf-8 strings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 622
diff changeset
104
38face2a84a4 metadata are utf-8 strings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 622
diff changeset
105 However, pay attention to the fact that metadata must be UTF-8 strings
38face2a84a4 metadata are utf-8 strings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 622
diff changeset
106 terminated by the ``\0`` character. If you need to store arbitrary
38face2a84a4 metadata are utf-8 strings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 622
diff changeset
107 binary objects, use an attachment or use `Base64 encoding
38face2a84a4 metadata are utf-8 strings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 622
diff changeset
108 <https://en.wikipedia.org/wiki/Base64>`__.
78
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
109
79
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 78
diff changeset
110 Also note that metadata and attachments are only available for
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 78
diff changeset
111 resources stored inside Orthanc. Once one DICOM instance leaves the
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 78
diff changeset
112 Orthanc ecosystem, its associated metadata and attachments are lost.
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 78
diff changeset
113
78
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
114
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
115 Core metadata
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
116 ^^^^^^^^^^^^^
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
117
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
118 Here are the main metadata handled by the Orthanc core:
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
119
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
120 * ``ReceptionDate`` records when a DICOM instance was received by
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
121 Orthanc. Similarly, ``LastUpdate`` records, for each
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
122 patient/study/series, the last time a DICOM instance was added to
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
123 this resource.
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
124 * ``RemoteAet`` records the AET of the modality that has sent some
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
125 DICOM instance to Orthanc.
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
126 * ``ModifiedFrom`` and ``AnonymizedFrom`` hold from which original
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
127 resource, a resource was modified or anonymized. The presence of
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
128 this metadata indicates that the resource is the result of a
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
129 modification or anonymization that was carried on by Orthanc.
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
130 * ``Origin`` records through which mechanism the instance was received
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
131 by Orthanc (may be ``Unknown``, ``DicomProtocol``, ``RestApi``,
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
132 ``Plugins``, or ``Lua``).
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
133 * ``IndexInSeries`` records the expected index of a DICOM instance
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
134 inside its parent series. Conversely, ``ExpectedNumberOfInstances``
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
135 associates to each series, the number of DICOM instances this series
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
136 is expected to contain.
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
137 * Starting with Orthanc 1.2.0, ``TransferSyntax`` and ``SopClassUid``
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
138 respectively stores the transfer syntax UID and the SOP class UID of
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
139 DICOM instances, in order to speed up the access to this
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
140 information.
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
141
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
142 Metadata listed above are set privately by the Orthanc core. They are
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
143 **read-only** from the perspective of the end user, as Orthanc
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
144 internally relies on them.
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
145
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
146
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
147 User-defined metadata
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
148 ^^^^^^^^^^^^^^^^^^^^^
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
149
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
150 The metadata described above where handled by the core of Orthanc.
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
151 Orthanc users are however allowed to define their own **user-defined
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
152 metadata**. Such metadata are associated with an integer key that is
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
153 greater or equal to 1024 (whereas keys below 1023 are reserved for
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
154 core metadata).
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
155
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
156 You can associate a symbolic name to user-defined metadata using the
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
157 ``UserMetadata`` option inside the :ref:`configuration of Orthanc
92
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
158 <configuration>`::
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
159
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
160 "UserMetadata" : {
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
161 "SampleMetaData1" : 1024,
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
162 "SampleMetaData2" : 1025
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
163 }
78
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
164
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
165
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
166 Accessing metadata
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
167 ^^^^^^^^^^^^^^^^^^
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
168
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
169 .. highlight:: bash
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
170
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
171 Metadata associated with one DICOM resource can be accessed through
80
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 79
diff changeset
172 the :ref:`REST API <rest>`, for instance::
78
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
173
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
174 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/metadata
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
175 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/metadata/RemoteAet
92
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
176 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/metadata/SampleMetaData1
78
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
177
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
178 User-defined metadata can be modified by issuing a HTTP PUT against
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
179 the REST API::
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
180
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
181 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/metadata/1024 -X PUT -d 'hello'
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
182 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/metadata/1024
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
183 hello
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
184
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
185
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
186
92
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
187 .. _attachments:
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
188
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
189 User-defined attachments
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
190 ^^^^^^^^^^^^^^^^^^^^^^^^
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
191
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
192 Orthanc users are allowed to define their own **user-defined attachments**.
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
193 Such attachments are associated with an integer key that is
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
194 greater or equal to 1024 (whereas keys below 1023 are reserved for
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
195 core attachments).
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
196
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
197 You can associate a symbolic name to user-defined attachments using the
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
198 ``UserContentType`` option inside the :ref:`configuration of Orthanc
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
199 <configuration>`. Optionally, the user may specify a MIME content type
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
200 for the attachment::
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
201
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
202 "UserContentType" : {
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
203 "samplePdf" : [1024, "application/pdf"],
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
204 "sampleJson" : [1025, "application/json"],
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
205 "sampleRaw" : 1026
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
206 }
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
207
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
208 Accessing attachments
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
209 ^^^^^^^^^^^^^^^^^^^^^
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
210
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
211 .. highlight:: bash
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
212
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
213 Attachments associated with one DICOM resource can be accessed through
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
214 the :ref:`REST API <rest>`, for instance::
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
215
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
216 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/attachments/samplePdf/data
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
217 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/attachments/sampleJson/data
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
218
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
219 User-defined attachments can be modified by issuing a HTTP PUT against
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
220 the REST API::
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
221
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
222 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/attachments/samplePdf -X PUT --data-binary @sample.pdf
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
223 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/attachments/sampleRaw -X PUT -d 'raw data'
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
224
a3d3ff83024d attachments doc + build with docker
amazy
parents: 80
diff changeset
225
78
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
226 .. _registry:
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
227
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
228 Central registry of metadata and attachments
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
229 --------------------------------------------
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
230
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
231 Obviously, one must pay attention to the fact that different
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
232 applications might use the same key to store different user-defined
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
233 :ref:`metadata <metadata>`, which might result in incompatibilities
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
234 between such applications. Similarly, incompatibilities might show up
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
235 for user-defined :ref:`attachments <orthanc-storage>`.
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
236
601
4c19a897803e global property 5467
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 595
diff changeset
237 Developers of applications/plugins that use user-defined metadata,
4c19a897803e global property 5467
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 595
diff changeset
238 attachments or global properties (using
4c19a897803e global property 5467
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 595
diff changeset
239 ``OrthancPluginSetGlobalProperty()``) are therefore kindly invited to
4c19a897803e global property 5467
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 595
diff changeset
240 complete the **central registry** below:
78
d6bd1dd820e5 metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 25
diff changeset
241
622
debcf6b6d070 dicom-as-json is now deprecated
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 621
diff changeset
242 * ``Attachment 1`` is used by the core of Orthanc to store the DICOM
debcf6b6d070 dicom-as-json is now deprecated
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 621
diff changeset
243 file associated with one instance.
debcf6b6d070 dicom-as-json is now deprecated
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 621
diff changeset
244 * ``Attachment 2`` was used by Orthanc <= 1.9.0 to cache the so-called
debcf6b6d070 dicom-as-json is now deprecated
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 621
diff changeset
245 ``DICOM-as-JSON`` information (as returned by the
debcf6b6d070 dicom-as-json is now deprecated
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 621
diff changeset
246 ``/instances/.../tags`` URI in the :ref:`REST API <rest>`) in order
debcf6b6d070 dicom-as-json is now deprecated
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 621
diff changeset
247 to speed up subsequent requests to the same URI. This attachment is
debcf6b6d070 dicom-as-json is now deprecated
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 621
diff changeset
248 not automatically generated anymore starting with Orthanc 1.9.1, in
debcf6b6d070 dicom-as-json is now deprecated
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 621
diff changeset
249 order to improve performance (creating two files for each DICOM
debcf6b6d070 dicom-as-json is now deprecated
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 621
diff changeset
250 instance has a cost) and consistency (if the DICOM dictionary gets
debcf6b6d070 dicom-as-json is now deprecated
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 621
diff changeset
251 modified in the future).
debcf6b6d070 dicom-as-json is now deprecated
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 621
diff changeset
252 * ``Attachment 3`` is used since Orthanc 1.9.1 to store the DICOM
debcf6b6d070 dicom-as-json is now deprecated
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 621
diff changeset
253 instance until the ``Pixel Data (7fe0,0010)`` tag, if the global
debcf6b6d070 dicom-as-json is now deprecated
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 621
diff changeset
254 configuration option ``StorageCompression`` is ``true``, or if the
debcf6b6d070 dicom-as-json is now deprecated
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 621
diff changeset
255 storage area plugin doesn't support range reads. This allows to
debcf6b6d070 dicom-as-json is now deprecated
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 621
diff changeset
256 avoid downloading the full DICOM instance if not necessary.
359
9acb9354da1a links to hg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 278
diff changeset
257 * ``Attachment 9997`` is used by the :ref:`Osimis WebViewer plugin <osimis_webviewer>` to store series information.
9acb9354da1a links to hg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 278
diff changeset
258 * ``Attachment 9998`` is used by the :ref:`Osimis WebViewer plugin <osimis_webviewer>` to store instance information.
9acb9354da1a links to hg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 278
diff changeset
259 * ``Attachment 9999`` is used by the :ref:`Osimis WebViewer plugin <osimis_webviewer>` to store annotations.
9acb9354da1a links to hg
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 278
diff changeset
260 * ``Attachments 10000-13999`` are used by the :ref:`Osimis WebViewer plugin <osimis_webviewer>` to store reduced quality images.
601
4c19a897803e global property 5467
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 595
diff changeset
261 * ``Global property 5467`` is used by the Osimis Cloud plugin.
602
6e7d3f20227b index global property 5468
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 601
diff changeset
262 * ``Global property 5468`` is used by the :ref:`DICOMweb plugin <dicomweb>` to store the DICOMweb servers into the Orthanc database.
6e7d3f20227b index global property 5468
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 601
diff changeset
263 * ``Metadata 4200`` is used by the plugin for :ref:`whole-slide imaging <wsi>` with version <= 0.7.
6e7d3f20227b index global property 5468
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 601
diff changeset
264 * ``Metadata 4201`` is used by the plugin for :ref:`whole-slide imaging <wsi>` with version >= 1.0.
224
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 218
diff changeset
265
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 218
diff changeset
266
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 218
diff changeset
267 Jobs
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 218
diff changeset
268 ----
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 218
diff changeset
269
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 218
diff changeset
270 Check out the :ref:`advanced features of the REST API <jobs>`.
02399e86f046 starting documentation of jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 218
diff changeset
271