Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Array » Array Composition » FlattenArray


Module: FoundationLite

Receives an array of arrays, and creates a single one-dimensional array containing all individual elements.


E.g. when multiple points are detected within multiple regions we receive a Point2DArrayArray. This 2D data structure keeps track of which point comes from which region. We can flatten this structure to 1D array by using this filter.
Name Type Description
Input value
inArray <T>ArrayArray Array to be flattened
Output value
outFlattenedArray <T>Array Flattened array

The type of this filter is defined using the type variable T which represents any valid type. Read more.


The operation creates an one-dimensional array from all elements of an input two-dimensional array. Type of filter is defined on initialization by using type variable T. Input array of arrays size is not restricted.


            inArray = { { 0 , 3 },
                        { 1 , 4 },
                        { 2 , 5 } }
        outFlattenedArray = { 0, 
                              5 }

Complexity Level

This filter is available on Basic Complexity Level.

See Also