comparison 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
comparison
equal deleted inserted replaced
631:9fa56c042d92 632:38face2a84a4
95 95
96 In spirit, the metadata mechanism is similar to the :ref:`attachment 96 In spirit, the metadata mechanism is similar to the :ref:`attachment
97 mechanism <orthanc-storage>`. However, metadata is stored directly 97 mechanism <orthanc-storage>`. However, metadata is stored directly
98 inside the database, whereas attachments are stored as separate files 98 inside the database, whereas attachments are stored as separate files
99 on the filesystem (the database only stores a reference to the 99 on the filesystem (the database only stores a reference to the
100 attachments). Choosing between metadata and attachments is a matter of 100 attachments). Choosing between metadata and attachments is most often
101 trade-off: Metadata must be kept small (as a rule of thumb, under 1KB) 101 a matter of trade-off: Metadata must be kept small (as a rule of
102 and used if fast access is needed, whereas attachments can be used to 102 thumb, under 1KB) and used if fast access is needed, whereas
103 store arbitrarily large piece of data. 103 attachments can be used to store arbitrarily large piece of data.
104
105 However, pay attention to the fact that metadata must be UTF-8 strings
106 terminated by the ``\0`` character. If you need to store arbitrary
107 binary objects, use an attachment or use `Base64 encoding
108 <https://en.wikipedia.org/wiki/Base64>`__.
104 109
105 Also note that metadata and attachments are only available for 110 Also note that metadata and attachments are only available for
106 resources stored inside Orthanc. Once one DICOM instance leaves the 111 resources stored inside Orthanc. Once one DICOM instance leaves the
107 Orthanc ecosystem, its associated metadata and attachments are lost. 112 Orthanc ecosystem, its associated metadata and attachments are lost.
108 113