HALCON 12 introduce a new data type named ‘vector’. Vectors allow you to create multi-dimensional arrays, which was not possible using tuples. Vectors can store iconic objects as well as control variables.
Vectors can be very useful for managing inspection tasks. A vector can contain, for example, the serial no. of a part, a reference image, or multiple regions of interest containing unique parameter sets and inspection results.
Vectors can also be used as input and output parameters of HDevelop procedures.
Vectors are also useful, for example, for storing contour attributes. Operators like get_contour_attrib_xld only accept single contours as an input parameter. To store the attributes of a contour array, you would have had to create two tuples: one that stores the number of points of each contour, and another one that stores the actual values. Vectors allow you to handle this much more efficiently.
You can also store iconic objects in a vector. Simply assign them like this:
MyIconicVector.at(0) := Image
MyIconicVector.at(1) := Region
..
To familiarize yourself with the sytntax for handling vectors take a look at the example program vector_variables.hdev available when you download HALCON.