Read first: Introduction to Data Flow Programming.
Integer number, image or two-dimensional straight line are examples of what is called a type of data. Types define the structure and the meaning of information that is being processed. In Adaptive Vision Studio types also play an important role in guiding program construction – the environment assures that only inputs and outputs of compatible types can be connected.
The most fundamental data types in Adaptive Vision Studio are:
- Integer – Integer number in the range of approx. ±2 billions (32 bits).
- Real – Floating-point approximation of real numbers (32 bits)
- Bool – Logical value – False or True.
- String – Sequence of characters (text) encoded as UTF-16 unicode.
Complex types of data used in Adaptive Vision Studio are built with one of the following constructs:
Composite data consisting of a fixed number of named fields. For example, the Point2D type is a structure composed of two real-valued fields: X and Y.
More information about using structures can be found: here.
Composite data composed of zero, one or many elements of the same type. In Adaptive Vision Studio for any type X there is a corresponding XArray type, including XArrayArray. For example, there are types: Point2D, Point2DArray, Point2DArrayArray and more.
Example filters having arrays on the outputs:
- ScanMultipleEdges – returns an array of multiple found edge points.
- SplitRegionIntoBlobs – returns an array of multiple blob regions.
Example filters having arrays on inputs:
- Average – calculates the average of multiple real numbers.
- FitLineToPoints_M – creates a line best matching a set of two-dimensional points.
More information about using arrays can be found: here.
Some filter inputs can be left not connected and not set at all. These are said to be of an optional type. As for arrays, for each type X there is a corresponding optional X* type. The special value corresponding to the special not-set case is identified as Auto.
Example filters with optional inputs:
- ThresholdImage – has an optional inRoi input of the Region type for defining the region-of-interest. If the Auto value is provided, the entire image will be processed.
- FitLineToPoints_M – has an optional inOutlierSuppression input specifying one of several possible enhancement of line fitting. If the Auto value is provided, no enhancement is used.
More information about using optional inputs can be found: here.
Conditional types are similar to optional, but their purpose is different – with the Nil value they can represent lack of data on filter outputs, which results in conditional execution of the filters that follow. For each type X there is a corresponding conditional X? type.
Example filters with conditional outputs:
- SegmentSegmentIntersection – returns a common point of two segments or Nil if no such point exists.
- DetectSingleBarcode – returns a value read from a barcode or Nil if no barcode was found.
More information about conditional data can be found: here.
Enumeration types are intended to represent a fixed set of alternative options. For example, a value of the DrawingMode type can be equal to HighQuality or Fast. This allows to choose between quality and speed in the image drawing filters.
Array and conditional or optional types can be mixed together. Their names are then read in the reverse order. For example:
- IntegerArray? is read as "conditional array of integer numbers".
- Integer?Array is read as "array of conditional integer numbers".
Please note, that the above two types are very different. In the first case we have an array of numbers or no array at all (Nil). In the second case there is an array, in which every single element may be present or not.
A list of the most important data types available in Adaptive Vision Studio is here.
There is a special category of filters, Conversions, containing filters that define additional possibilities for connecting inputs and outputs. If there is a filter named XToY (where X and Y stand for some specific type names), then it is possible to create connections from outputs of type X to inputs of type Y. You can for example connect Integer to Real or Region to Image, because there are filters IntegerToReal and RegionToImage respectively. Further options can be added with user filters.
|Previous: Creating User Controls||Next: Structures|