Scripting API

btkSetMetaDataFormat

Module BTKMetaDataModifier

Description#

Sets metadata's format.

Parameters#

hHandle pointing to a C++ btk::Acquisition object.
labelString specifying the label of a metadata.
sublabel_pathpath to extract only the metadata and its children with the label sublabel from the metadata 'label'.
newformatStringwith the new format (see detailed description for the available format).

Returned Values#

mdstructure with the same format than the function btkGetMetaData

Detailed Description#

The following formats are available:
  • Char: metadata's values are strings
  • Byte: metadata's values are bytes (coded on 8 bits)
  • Integer: metadata's values are integer (coded on 16 bits)
  • Real: metadata's values are real (float coded on 32 bits) If you modify the format of a metadata, than its values are transformed to fit (if possible) the new format. There is no problem to transform a byte into an integer or in a float or a string. But the reverse is not always true. A string with a number inside (for example 1.2345) can be converted as a float. But the string HEEL will be converted as the value 0. Moreover, converting a string to a number (or the reverse) will adapt automatically the dimensions.
The number of sub-level is infinite. However, the main common use of the metadata is to use 2 levels. This use was introduced in the C3D format.

Notes#

See also#

btkSetMetaDataFormat

Syntax#

md = btkSetMetaDataFormat(h, label, newformat)
md = btkSetMetaDataFormat(h, label, sublabel_path, newformat)

Examples#