set_dict_object — Add a key/object pair to the dictionary.
set_dict_object stores an object associated with a key in the
The dictionary is denoted by the
Object is copied by the operation and can thus be
Thereby the object data is copied in HALCON's object database,
meaning the new object contains a reference to
Both an empty object or an object tuple are considered
as a valid value that can be associated with the key.
If any data (tuple or object) was already associated with given key
Key), the old data is destroyed by
and replaced by
Key has to be a string or an integer.
Strings are treated case sensitive.
The object data for the given key can be retrieved again from the dictionary
This operator modifies the state of the following input parameter:
During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.
Object to be associated with the key.
DictHandle(input_control, state is modified) dict
Number of elements: DictHandle == 1
→(string / integer)
Number of elements: Key == 1
length(Key) > 0
create_dict (Dict) read_image (Image, 'filename') set_dict_object (Image, Dict, 'my_image')
If the operation succeeds,
set_dict_tuple returns 2 (H_MSG_TRUE).
Otherwise an exception is raised. Possible error conditions include
invalid parameters (handle or key) or resource allocation error.