obj_to_integerπ
Short descriptionπ
obj_to_integer β Convert an iconic object into an βinteger number.β
Signatureπ
obj_to_integer( object Objects, integer Index, integer Number, out pointer SurrogateTuple )
Descriptionπ
obj_to_integer stores Number, starting at index
Index, of the database keys of the input object
Objects as integer numbers in the output parameter
SurrogateTuple. If -1 is passed for Number all
objects beginning with Index are copied. This facilitates
a direct access to an arbitrary element of Objects. In
conjunction with count_obj (returns the number of objects in
Objects) the elements of Objects can be processed
successively. The objects are not duplicated by
obj_to_integer and thus must not be cleared by
clear_obj.
For a short description of the iconic objects that are available in HALCON see the introduction of chapter Object.
Attentionπ
The objectsβ data is not duplicated.
Execution informationπ
Execution information
-
Supports objects on compute devices.
-
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
-
Multithreading scope: global (may be called from any thread).
-
Processed without parallelization.
Parametersπ
Objects (input_object) object(-array) β object
Objects for which the surrogates are to be returned.
Index (input_control) integer β (integer)
Starting index of the surrogates to be returned.
Default: 1
Value range: 1 β€ Index
Number (input_control) integer β (integer)
Number of surrogates to be returned.
Default: -1
Restriction: (Number == -1) || (Number + Index <= number(Objects))
SurrogateTuple (output_control) pointer(-array) β (integer)
Tuple containing the surrogates.
Exampleπ
(HDevelop)
Complexityπ
Runtime complexity: \(O(|\textrm{Objects}| + \textrm{Number})\)
Resultπ
obj_to_integer returns 2 (H_MSG_TRUE) if all parameters are
correct. If the input is empty the behavior can be set via
set_system(::'no_object_result',<Result>:).
If necessary, an exception is raised.
Combinations with other operatorsπ
Moduleπ
Foundation