MMDevice 70
Public Member Functions | List of all members
MM::CameraImageMetadata Class Reference

Public Member Functions

template<typename V >
void AddTag (const char *key, V value)
 Add a tag.
 
void AddTag (const char *key, const char *value)
 Optimized overload for string values.
 
template<typename V >
void AddTag (const std::string &key, V value)
 Overload for std::string key.
 
void Clear ()
 Remove all tags.
 
const char * Serialize () const
 Return this metadata map serialized to string form.
 

Member Function Documentation

◆ AddTag()

template<typename V >
void MM::CameraImageMetadata::AddTag ( const char *  key,
value 
)
inline

Add a tag.

The key must not contain newlines.

At present, standard and custom keys are not formally distinguished. In custom keys, it is recommended to include a prefix identifying the camera adapter. For example, "AcmeCam-SensorTemperature" where AcmeCam is the name of the camera adapter.

The value should be a string, integer, or floating point number. If it is a string, it must not contain newlines. Very long strings are discouraged.

If a tag with the same key is added more than once, the last value wins. However, doing so may consume memory. Call Clear() to reuse an instance; if some of the tags are constant, keep an instance with just the constant tags and copy-assign it to the reused instance.

Parameters
keythe key (must not be null)
valuethe value

Referenced by AddTag(), and CCameraBase< U >::GetTags().

◆ Serialize()

const char * MM::CameraImageMetadata::Serialize ( ) const
inline

Return this metadata map serialized to string form.

This is the form used to transmit data from a camera device to MMCore via the InsertImage() function. (The exact format may change with the Device Interface Version.)

The returned string is valid until this metadata map is mutated or destroyed.

Returns
the serialized metadata map

Referenced by CCameraBase< U >::GetTags().


The documentation for this class was generated from the following file: