Mercurial > hg > orthanc-book
comparison Sphinx/source/faq/features.rst @ 92:a3d3ff83024d
attachments doc + build with docker
author | amazy |
---|---|
date | Wed, 08 Feb 2017 20:22:42 +0100 |
parents | 0e8b85acf3e0 |
children | 065350232191 |
comparison
equal
deleted
inserted
replaced
91:025744919357 | 92:a3d3ff83024d |
---|---|
75 :ref:`Orthanc configuration file <configuration>`. | 75 :ref:`Orthanc configuration file <configuration>`. |
76 | 76 |
77 | 77 |
78 .. _metadata: | 78 .. _metadata: |
79 | 79 |
80 Metadata | 80 Metadata & attachments |
81 -------- | 81 ---------------------- |
82 | 82 |
83 Metadata consists in an **associative key-value array** (mapping a | 83 Metadata consists in an **associative key-value array** (mapping a |
84 integer key in the range [0,65535] to a string value) that is | 84 integer key in the range [0,65535] to a string value) that is |
85 associated with each :ref:`DICOM resource <orthanc-ids>` stored inside | 85 associated with each :ref:`DICOM resource <orthanc-ids>` stored inside |
86 Orthanc (may it be a patient, a study, a series or a DICOM | 86 Orthanc (may it be a patient, a study, a series or a DICOM |
143 greater or equal to 1024 (whereas keys below 1023 are reserved for | 143 greater or equal to 1024 (whereas keys below 1023 are reserved for |
144 core metadata). | 144 core metadata). |
145 | 145 |
146 You can associate a symbolic name to user-defined metadata using the | 146 You can associate a symbolic name to user-defined metadata using the |
147 ``UserMetadata`` option inside the :ref:`configuration of Orthanc | 147 ``UserMetadata`` option inside the :ref:`configuration of Orthanc |
148 <configuration>`. | 148 <configuration>`:: |
149 | |
150 "UserMetadata" : { | |
151 "SampleMetaData1" : 1024, | |
152 "SampleMetaData2" : 1025 | |
153 } | |
149 | 154 |
150 | 155 |
151 Accessing metadata | 156 Accessing metadata |
152 ^^^^^^^^^^^^^^^^^^ | 157 ^^^^^^^^^^^^^^^^^^ |
153 | 158 |
156 Metadata associated with one DICOM resource can be accessed through | 161 Metadata associated with one DICOM resource can be accessed through |
157 the :ref:`REST API <rest>`, for instance:: | 162 the :ref:`REST API <rest>`, for instance:: |
158 | 163 |
159 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/metadata | 164 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/metadata |
160 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/metadata/RemoteAet | 165 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/metadata/RemoteAet |
166 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/metadata/SampleMetaData1 | |
161 | 167 |
162 User-defined metadata can be modified by issuing a HTTP PUT against | 168 User-defined metadata can be modified by issuing a HTTP PUT against |
163 the REST API:: | 169 the REST API:: |
164 | 170 |
165 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/metadata/1024 -X PUT -d 'hello' | 171 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/metadata/1024 -X PUT -d 'hello' |
166 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/metadata/1024 | 172 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/metadata/1024 |
167 hello | 173 hello |
168 | 174 |
169 | 175 |
176 | |
177 .. _attachments: | |
178 | |
179 User-defined attachments | |
180 ^^^^^^^^^^^^^^^^^^^^^^^^ | |
181 | |
182 Orthanc users are allowed to define their own **user-defined attachments**. | |
183 Such attachments are associated with an integer key that is | |
184 greater or equal to 1024 (whereas keys below 1023 are reserved for | |
185 core attachments). | |
186 | |
187 You can associate a symbolic name to user-defined attachments using the | |
188 ``UserContentType`` option inside the :ref:`configuration of Orthanc | |
189 <configuration>`. Optionally, the user may specify a MIME content type | |
190 for the attachment:: | |
191 | |
192 "UserContentType" : { | |
193 "samplePdf" : [1024, "application/pdf"], | |
194 "sampleJson" : [1025, "application/json"], | |
195 "sampleRaw" : 1026 | |
196 } | |
197 | |
198 Accessing attachments | |
199 ^^^^^^^^^^^^^^^^^^^^^ | |
200 | |
201 .. highlight:: bash | |
202 | |
203 Attachments associated with one DICOM resource can be accessed through | |
204 the :ref:`REST API <rest>`, for instance:: | |
205 | |
206 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/attachments/samplePdf/data | |
207 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/attachments/sampleJson/data | |
208 | |
209 User-defined attachments can be modified by issuing a HTTP PUT against | |
210 the REST API:: | |
211 | |
212 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/attachments/samplePdf -X PUT --data-binary @sample.pdf | |
213 $ curl http://localhost:8042/instances/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/attachments/sampleRaw -X PUT -d 'raw data' | |
214 | |
170 | 215 |
171 .. _registry: | 216 .. _registry: |
172 | 217 |
173 Central registry of metadata and attachments | 218 Central registry of metadata and attachments |
174 -------------------------------------------- | 219 -------------------------------------------- |