| Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
| Version 1.9 Build 803 |
|
A LEL expression can be as simple or as complex as one likes
using the standard
arithmetic, comparison, and logical operators.
Parentheses can be used to group subexpressions.
The operands in an expression can be
lattices,
constants,
functions, and
condition masks.
lattice regions and masks.
E.g.
lat1 + 10 lat1 + 2 * max(lat2,1) amp(lat1, lat2) lat1 + mean(img[region1]) lat1 + mean(lat2[lat2>5 && lat2<10])
The last example shows how a boolean expression can be used to form a mask on a lattice. Only the pixels fulfilling the boolean condition will be used when calculating the mean.
In general the result of a LEL expression is a lattice,
but it can be a scalar too. If is is a scalar, it will be handled correctly
by C++ and glish functions using it as the source in, say, an
assignment to another lattice.
LEL fully supports masks. In most cases the mask of a
subexpression is formed by and-ing the masks of its operands.
It is fully explained in a later section.
LEL supports the following data types:
Region is a specific data type. It indicates a region of any type (in pixel or world coordinates, relative, fractional). A region can only be applied to a lattice subexpression using operator [].