Scripting API
btkSetMetaDataFormat
Module | BTKMetaDataModifier |
Description#
Sets metadata's format.
Parameters#
h | Handle pointing to a C++ btk::Acquisition object. |
label | String specifying the label of a metadata. |
sublabel_path | path to extract only the metadata and its children with the label sublabel from the metadata 'label'. |
newformat | String with the new format (see detailed description for the available format). |
Returned Values#
md | structure 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.