Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Array Transforms » RemoveNils

RemoveNils


Removes all Nil elements from an array.

Name Type Description
inArray <T>?Array Input array
outArray <T>Array Output array
outElementExisted BoolArray Array with the same size as input array representing if the element was not a Nil

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

Applications

This filter is useful e.g. when inspecting multiple objects while some of the inspections may fail (Nil result). RemoveNils is used to ignore the failed cases in the final result.

Examples

Description of usage of this filter can be found in examples and tutorial: IO Serial Port Communicator, Washers, Plate Measurement (Advanced).
inArray = {2, 5, Nil, Nil, 7, Nil}
outArray = {2, 5, 7}

Complexity Level

This filter is available on Basic Complexity Level.