HALCON Reference Manual 10.0.2
Table of Contents / Object / Manipulation ClassesClassesClasses | | | Operators

obj_to_integerobj_to_integerobj_to_integerObjToIntegerObjToInteger (Operator)

Name

obj_to_integerobj_to_integerobj_to_integerObjToIntegerObjToInteger — Convert an iconic object into an “integer number.”

Signature

obj_to_integer(Objects : : Index, Number : SurrogateTuple)

Herror obj_to_integer(const Hobject Objects, const Hlong Index, const Hlong Number, Hlong* SurrogateTuple)

Herror T_obj_to_integer(const Hobject Objects, const Htuple Index, const Htuple Number, Htuple* SurrogateTuple)

Herror obj_to_integer(Hobject Objects, const HTuple& Index, const HTuple& Number, Hlong* SurrogateTuple)

Herror obj_to_integer(Hobject Objects, const HTuple& Index, const HTuple& Number, HTuple* SurrogateTuple)

void HOperatorSetX.ObjToInteger(
[in] IHUntypedObjectX* Objects, [in] VARIANT Index, [in] VARIANT Number, [out] VARIANT* SurrogateTuple)

VARIANT HImageX.ObjToInteger(
[in] Hlong Index, [in] Hlong Number)

VARIANT HRegionX.ObjToInteger(
[in] Hlong Index, [in] Hlong Number)

VARIANT HUntypedObjectX.ObjToInteger(
[in] Hlong Index, [in] Hlong Number)

VARIANT HXLDContX.ObjToInteger(
[in] Hlong Index, [in] Hlong Number)

VARIANT HXLDPolyX.ObjToInteger(
[in] Hlong Index, [in] Hlong Number)

VARIANT HXLDParaX.ObjToInteger(
[in] Hlong Index, [in] Hlong Number)

VARIANT HXLDModParaX.ObjToInteger(
[in] Hlong Index, [in] Hlong Number)

VARIANT HXLDExtParaX.ObjToInteger(
[in] Hlong Index, [in] Hlong Number)

static void HOperatorSet.ObjToInteger(HObject objects, HTuple index, HTuple number, out HTuple surrogateTuple)

HTuple HObject.ObjToInteger(int index, int number)

HTuple HImage.ObjToInteger(int index, int number)

HTuple HRegion.ObjToInteger(int index, int number)

HTuple HXLD.ObjToInteger(int index, int number)

HTuple HXLDCont.ObjToInteger(int index, int number)

HTuple HXLDPoly.ObjToInteger(int index, int number)

HTuple HXLDPara.ObjToInteger(int index, int number)

HTuple HXLDModPara.ObjToInteger(int index, int number)

HTuple HXLDExtPara.ObjToInteger(int index, int number)

Description

obj_to_integerobj_to_integerobj_to_integerObjToIntegerObjToInteger stores NumberNumberNumberNumbernumber, starting at index IndexIndexIndexIndexindex, of the database keys of the input object ObjectsObjectsObjectsObjectsobjects as integer numbers in the output parameter SurrogateTupleSurrogateTupleSurrogateTupleSurrogateTuplesurrogateTuple. If -1 is passed for NumberNumberNumberNumbernumber all objects beginning with IndexIndexIndexIndexindex are copied. This facilitates a direct access to an arbitrary element of ObjectsObjectsObjectsObjectsobjects. In conjunction with count_objcount_objcount_objCountObjCountObj (returns the number of objects in ObjectsObjectsObjectsObjectsobjects) the elements of ObjectsObjectsObjectsObjectsobjects can be processed successively. The objects are not duplicated by obj_to_integerobj_to_integerobj_to_integerObjToIntegerObjToInteger and thus must not be cleared by clear_objclear_objclear_objClearObjClearObj.

Attention

The objects' data is not duplicated.

Parallelization

Parameters

ObjectsObjectsObjectsObjectsobjects (input_object)  object(-array) objectHObjectHObjectHObjectXHobject

Objects for which the surrogates are to be returned.

IndexIndexIndexIndexindex (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Starting index of the surrogates to be returned.

Default value: 1

Typical range of values: 1 ≤ Index Index Index Index index

NumberNumberNumberNumbernumber (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Number of surrogates to be returned.

Default value: -1

Restriction: (Number == -1) || ((Number + Index) <= number(Objects))

SurrogateTupleSurrogateTupleSurrogateTupleSurrogateTuplesurrogateTuple (output_control)  pointer(-array) HTupleHTupleVARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Tuple containing the surrogates.

Example (HDevelop)

* Access the i-th element:
obj_to_integer(Objects,i,1,Surrogat)

Example (C)

/* Access the i-th element: */
long i,Surrogate;
obj_to_integer(Objects,i,1,&Surrogat);

Example (HDevelop)

* Access the i-th element:
obj_to_integer(Objects,i,1,Surrogat)

Example (HDevelop)

* Access the i-th element:
obj_to_integer(Objects,i,1,Surrogat)

Example (HDevelop)

* Access the i-th element:
obj_to_integer(Objects,i,1,Surrogat)

Complexity

Runtime complexity: O(|ObjectsObjectsObjectsObjectsobjects| + NumberNumberNumberNumbernumber)

Result

obj_to_integerobj_to_integerobj_to_integerObjToIntegerObjToInteger 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>:)set_system("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

Alternatives

copy_objcopy_objcopy_objCopyObjCopyObj, select_objselect_objselect_objSelectObjSelectObj, copy_imagecopy_imagecopy_imageCopyImageCopyImage, gen_image_protogen_image_protogen_image_protoGenImageProtoGenImageProto

See also

integer_to_objinteger_to_objinteger_to_objIntegerToObjIntegerToObj, count_objcount_objcount_objCountObjCountObj

Module

Foundation


Table of Contents / Object / Manipulation ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH