BTK Matlab Wrapper  0.3dev.0
Matlab bindings for the Biomechanical ToolKit library (BTK)
btkSetMetaDataFormat Class Reference

Description

Set a metadata's format.

Syntax:
md = btkSetMetaDataFormat(h, idx, newformat)
md = btkSetMetaDataFormat(h, idx, subidx, newformat)
md = btkSetMetaDataFormat(h, idx, subidx, ..., newformat)
md = btkSetMetaDataFormat(h, label, newformat)
md = btkSetMetaDataFormat(h, label, sublabel, newformat)
md = btkSetMetaDataFormat(h, label, sublabel, ..., newformat)
Parameters
hHandle pointing to a C++ btk::Acquisition object.
idxInteger specifying the index of a metadata.
subidxInteger specifying the index of a metadata.
labelString specifying the label of a metadata.
sublabelString specifying the label of a metadata.
...Others integers and/or strings to select the metadata to remove.
newformatString with the new format (see detailed description for the available format).
Return values
mdStructure with the same format than the function btkGetMetaData.
Detailed description:
btkSetMetaDataFormat(h, idx, newformat) sets the format of the metadata with the index idx contained in the root. btkSetMetaDataFormat(h, idx, subidx, newformat) sets the format of the metadata with the index subidx contained in the metadata with the index idx. btkSetMetaDataFormat(h, idx, subidx, ..., newformat) sets the format of any metadata specified by the gives indices. btkSetMetaDataFormat(h, label, newformat) sets the format of the metadata with the label label contained in the root. btkSetMetaDataFormat(h, label, sublabel, newformat) sets the format of the metadata with the label sublabel contained in the metadata with the label label. btkSetMetaDataFormat(h, label, sublabel, ..., newformat) sets the format of any metadata specified by the given labels.

You can mix label and index to set the format of a metadata entry.

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.
See Also
btkSetMetaDataDescription, btkSetMetaDataDimensions, btkSetMetaDataLabel, btkSetMetaDataUnlock, btkSetMetaDataValue