Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
image_expression_type [2016/07/24 17:53]
hermann [General Functions]
image_expression_type [2022/02/17 18:27] (current)
chrystian
Line 5: Line 5:
 ===== GUI Editor ===== ===== GUI Editor =====
  
-[{{ :​editors:​image_expression_editor.png?​nolink&​ |Graphical representation of the image expression ​editor ​editor}}]+[{{ :​editors:​image_expression_editor.png?​nolink&​ |Graphical representation of the image expression editor}}]
  
 ===== Operators ===== ===== Operators =====
Line 18: Line 18:
  
 ^ [[wp>​Order_of_operations|Precedence]] ^ Operator ^ Description ^ Syntax ^ Usage Example ^ ^ [[wp>​Order_of_operations|Precedence]] ^ Operator ^ Description ^ Syntax ^ Usage Example ^
-| 1 | Conditional | Execute the second or third term of the equation conditionally to the first | if@@@EXPR@@@then@@@EXPR@@@else@@@EXPR | if@@@@@@not@@@@@@isNull(i1)@@@@@@and@@@@@@isNull(i2)@@@@@@then \\ @@@@@@i3 \\ else@@@@@@if@@@@@@isNull(i1)@@@@@@then \\ @@@@@@i1@@@@@@–@@@@@@i1@@@@@@/​@@@@@@i2 \\ else@@@@@@(i1@@@@@@/​@@@@@@i2)@@@@@@?​@@@@@@(i1@@@@@@–@@@@@@i2) |+| 1 | Conditional | Execute the second or third term of the equation conditionally to the first | if@@@EXPR@@@then@@@EXPR@@@else@@@EXPR | if@@@@@@not@@@@@@isNull(i1)@@@@@@and@@@@@@isNull(i2)@@@@@@then \\ @@@@@@i3 \\ else@@@@@@if@@@@@@isNull(i1)@@@@@@then \\ @@@@@@i1@@@@@@–@@@@@@i1@@@@@@/​@@@@@@i2 \\ else@@@@@@(i1@@@@@@–@@@@@@i2) |
 | 2 | Boolean Or | The expression evaluation returns true if any of its arguments is true. See [[wp>​Logical_disjunction#​Truth_table|logical disjunction]] for additional information about the boolean logic. The evaluation is [[wp>​Short-circuit_evaluation|short-circuited]]. | EXPR@@@or@@@EXPR\\ EXPR@@@<​nowiki>​||</​nowiki>​@@@EXPR | not@@@@@@isNull(i1)@@@@@@or@@@@@@isNull(i2) \\ not@@@@@@isNull(i1)@@@@@@<​nowiki>​||</​nowiki>​@@@@@@isNull(i2) | | 2 | Boolean Or | The expression evaluation returns true if any of its arguments is true. See [[wp>​Logical_disjunction#​Truth_table|logical disjunction]] for additional information about the boolean logic. The evaluation is [[wp>​Short-circuit_evaluation|short-circuited]]. | EXPR@@@or@@@EXPR\\ EXPR@@@<​nowiki>​||</​nowiki>​@@@EXPR | not@@@@@@isNull(i1)@@@@@@or@@@@@@isNull(i2) \\ not@@@@@@isNull(i1)@@@@@@<​nowiki>​||</​nowiki>​@@@@@@isNull(i2) |
 | ::: | Boolean And | The expression evaluation returns true if and only if all its arguments are true. See [[wp>​Logical_conjunction#​Truth_table|logical conjunction]] for additional information about the boolean logic. The evaluation is [[wp>​Short-circuit_evaluation|short-circuited]]. | EXPR@@@and@@@EXPR \\ EXPR@@@&&​@@@EXPR | not@@@@@@isNull(i1)@@@@@@and@@@@@@isNull(i2) \\ not@@@@@@isNull(i1)@@@@@@&&​@@@@@@isNull(i2) | | ::: | Boolean And | The expression evaluation returns true if and only if all its arguments are true. See [[wp>​Logical_conjunction#​Truth_table|logical conjunction]] for additional information about the boolean logic. The evaluation is [[wp>​Short-circuit_evaluation|short-circuited]]. | EXPR@@@and@@@EXPR \\ EXPR@@@&&​@@@EXPR | not@@@@@@isNull(i1)@@@@@@and@@@@@@isNull(i2) \\ not@@@@@@isNull(i1)@@@@@@&&​@@@@@@isNull(i2) |
Line 43: Line 43:
 | Random | Generate a random value using the Uniform probability distribution | rand | if@@@rand@@@>​@@@0.5@@@then@@@1@@@else@@@i2 |  | Random | Generate a random value using the Uniform probability distribution | rand | if@@@rand@@@>​@@@0.5@@@then@@@1@@@else@@@i2 | 
 | Uniform | Generate a random value using the Uniform probability distribution. The generated value lies between the given bounds. The first EXPR represents the lower bound and the second EXPR represents the upper bound | rUniform(EXPR,​@@@EXPR) | if@@@rUniform(12,​@@@15)@@@>​@@@14@@@then@@@1@@@else@@@i2 |  | Uniform | Generate a random value using the Uniform probability distribution. The generated value lies between the given bounds. The first EXPR represents the lower bound and the second EXPR represents the upper bound | rUniform(EXPR,​@@@EXPR) | if@@@rUniform(12,​@@@15)@@@>​@@@14@@@then@@@1@@@else@@@i2 | 
-| Normal | Generate a random value using the Normal probability distribution. The value is generated according to the first and second given EXPR representing,​ respectively,​ the mean and the variance ​of the distribution | rNormal(EXPR,​@@@EXPR) | if@@@rNormal(10,​@@@2)@@@>​@@@9@@@then@@@1@@@else@@@i2 | +| Normal | Generate a random value using the Normal probability distribution. The value is generated according to the first and second given EXPR representing,​ respectively,​ the mean and the deviation ​of the distribution | rNormal(EXPR,​@@@EXPR) | if@@@rNormal(10,​@@@2)@@@>​@@@9@@@then@@@1@@@else@@@i2 | 
 | Poisson | Generate a random value using the Poisson probability distribution. The value is generated according to the given EXPR representing the distribution lambda | rPoisson(EXPR) | if@@@rPoisson(100)@@@>​@@@95@@@then@@@1@@@else@@@i2 |  | Poisson | Generate a random value using the Poisson probability distribution. The value is generated according to the given EXPR representing the distribution lambda | rPoisson(EXPR) | if@@@rPoisson(100)@@@>​@@@95@@@then@@@1@@@else@@@i2 | 
-Squared ​Root | | sqrt(EXPR) | sqrt(i1@@@/​@@@i4) |+Square ​Root | Returns the square root of the expression ​| sqrt(EXPR) | sqrt(i1@@@/​@@@i4) |
 | Sin | Sin (input in radians) | sin(EXPR) | sin(i1@@@/​@@@i4) | | Sin | Sin (input in radians) | sin(EXPR) | sin(i1@@@/​@@@i4) |
 | Cos | Cos (input in radians) | cos(EXPR) | cos(i1@@@+@@@i2) | | Cos | Cos (input in radians) | cos(EXPR) | cos(i1@@@+@@@i2) |
Line 53: Line 53:
 | Atan | Atan (output in radians) | atan(EXPR) | atan(i1@@@+@@@i2) | | Atan | Atan (output in radians) | atan(EXPR) | atan(i1@@@+@@@i2) |
 | Ceil | [[wp>​Floor_and_ceiling_functions|Convert the value to the smallest following integer]] | ceil(EXPR) | ceil(i1@@@+@@@i2) | | Ceil | [[wp>​Floor_and_ceiling_functions|Convert the value to the smallest following integer]] | ceil(EXPR) | ceil(i1@@@+@@@i2) |
-| Exp | | exp(EXPR) | exp(i1[i1@@@+@@@i2]) |+| Exp | Returns the natural exponential of the expression ​| exp(EXPR) | exp(i1[i1@@@+@@@i2]) |
 | Floor | [[wp>​Floor_and_ceiling_functions|Convert the value to the largest previous integer]] | floor(EXPR) | floor(i1@@@+@@@i2) | | Floor | [[wp>​Floor_and_ceiling_functions|Convert the value to the largest previous integer]] | floor(EXPR) | floor(i1@@@+@@@i2) |
 | Round | Convert the value to the nearest integer | round(EXPR) | round(i1@@@/​@@@i4) | | Round | Convert the value to the nearest integer | round(EXPR) | round(i1@@@/​@@@i4) |
-| Abs | | abs(EXPR) | abs(i1@@@+@@@i2) | +| Abs | Returns the absolute value of the expression ​| abs(EXPR) | abs(i1@@@+@@@i2) | 
-| Ln | | ln(EXPR) | ln(i1@@@/​@@@i4) | +| Ln | Returns the natural logarithm of the expression ​| ln(EXPR) | ln(i1@@@/​@@@i4) | 
-| Log | | log(EXPR) | log(i1@@@/​@@@i4) | +| Log | Returns the logarithm of the expression to the base of 10 | log(EXPR) | log(i1@@@/​@@@i4) | 
-| Max | | max(EXPR,​@@@EXPR) | max(i1,​@@@i2) | +| Max | Returns the maximum value | max(EXPR,​@@@EXPR) | max(i1,​@@@i2) | 
-| Min | | min(EXPR,​@@@EXPR) | min(i1,​@@@i4) |+| Min | Returns the minimum value | min(EXPR,​@@@EXPR) | min(i1,​@@@i4) |
 | Signal | Return +1, if the expression is positive, -1, if it is negative, and 0, otherwise. | signal(EXPR) | signal(i1@@@-@@@4) | | Signal | Return +1, if the expression is positive, -1, if it is negative, and 0, otherwise. | signal(EXPR) | signal(i1@@@-@@@4) |
 | Abort | Abort the model execution | abort | if@@@i1@@@>​@@@0@@@then@@@i1@@@*@@@i2@@@+@@@4@@@else@@@abort | | Abort | Abort the model execution | abort | if@@@i1@@@>​@@@0@@@then@@@i1@@@*@@@i2@@@+@@@4@@@else@@@abort |
 | Pi | Return the value of the constant Π (3.14159265358979323846) | pi | i1@@@*@@@pi@@@/​@@@180 | | Pi | Return the value of the constant Π (3.14159265358979323846) | pi | i1@@@*@@@pi@@@/​@@@180 |
-| Clamp | Clamp the value to a specified range. The first EXPR represent ​the value that will be clamped. The second and third EXPR represent the minimum and the maximum value of the range used to clamp the given value. This function is equivalent to the following expression: \\ @@@@@@if@@@EXPR@@@<​@@@EXPR_MIN@@@then \\ @@@@@@@@@@@@EXPR_MIN \\ @@@@@@else@@@if@@@EXPR@@@>​@@@EXPR_MAX@@@then \\ @@@@@@@@@@@@EXPR_MAX \\ @@@@@@else \\ @@@@@@@@@@@@EXPR | clamp(EXPR,​@@@EXPR,​@@@EXPR) | clamp(v1, 1, 12) | +| Clamp | Clamp the value to a specified range. The first EXPR represents ​the value that will be clamped. The second and third EXPR represent the minimum and the maximum value from the range used to clamp the given value. This function is equivalent to the following expression: \\ @@@@@@if@@@EXPR@@@<​@@@EXPR_MIN@@@then \\ @@@@@@@@@@@@EXPR_MIN \\ @@@@@@else@@@if@@@EXPR@@@>​@@@EXPR_MAX@@@then \\ @@@@@@@@@@@@EXPR_MAX \\ @@@@@@else \\ @@@@@@@@@@@@EXPR | clamp(EXPR,​@@@EXPR,​@@@EXPR) | clamp(v1, 1, 12) | 
-| ClampMod | Clamp the value to a specified range, but use the mod of the range to determine where the given value lies in it. The first EXPR represent ​the value that will be clamped. The second and third EXPR represent the minimum and the maximum value of the range used to clamp the given value. This function is approximately equivalent to the following expression: \\ @@@@@@if@@@EXPR@@@>​@@@EXPR_MAX@@@or@@@EXPR@@@<​@@@EXPR_MIN@@@then \\ @@@@@@@@@@@@(EXPR@@@-@@@EXPR_MIN)@@@%@@@(EXPR_MAX@@@-@@@EXPR_MIN@@@+@@@1)@@@+@@@EXPR_MIN@@@-@@@1 \\ @@@@@@else \\ @@@@@@@@@@@@EXPR | clampMod(EXPR,​@@@EXPR,​@@@EXPR) | clampMod(v1,​ 2010, 2054) |+| ClampMod | Clamp the value to a specified range, but use the mod of the range to determine where the given value lies in. The first EXPR represents ​the value that will be clamped. The second and third EXPR represent the minimum and the maximum value from the range used to clamp the given value. This function is approximately equivalent to the following expression: \\ @@@@@@if@@@EXPR@@@>​@@@EXPR_MAX@@@or@@@EXPR@@@<​@@@EXPR_MIN@@@then \\ @@@@@@@@@@@@(EXPR@@@-@@@EXPR_MIN)@@@%@@@(EXPR_MAX@@@-@@@EXPR_MIN@@@+@@@1)@@@+@@@EXPR_MIN@@@-@@@1 \\ @@@@@@else \\ @@@@@@@@@@@@EXPR | clampMod(EXPR,​@@@EXPR,​@@@EXPR) | clampMod(v1,​ 2010, 2054) |
  
 ==== Value Operators ==== ==== Value Operators ====
Line 76: Line 76:
 ^ Operator ^ Description ^ Syntax ^ Usage Example ^ ^ Operator ^ Description ^ Syntax ^ Usage Example ^
 | Get Image Value | Return the image value at the current cell | IMAGE | i2 | | Get Image Value | Return the image value at the current cell | IMAGE | i2 |
-| Get Image Value At Location | Return the image value on the specified cell coordinate. The cell coordinate is defined by two expressions where the first expression represents the cell line and the second expression represents the cell column. | IMAGE[@@@,​@@@] | i1[line@@@–@@@1,​@@@column@@@–@@@2] |+| Get Image Value At Location | Return the image value on the specified cell coordinate. The cell coordinate is defined by two expressions where the first expression represents the cell line and the second expression represents the cell column. If the cell at that coordinate is null, the value 0 is returned. | IMAGE[@@@,​@@@] | i1[line@@@–@@@1,​@@@column@@@–@@@2] |
 | Get Image Null Value | Return the null value of the current image. It is also possible to specify an image whose corresponding null value will be retrieved. \\ The use of null without specifying an image "​poisons"​ the expression evaluation forcing the expression result to be invalid. | null \\ null(IMAGE) | if@@@i1@@@>​@@@2@@@then@@@i1@@@else@@@null \\ if@@@null(i2)@@@>​@@@2@@@then@@@1@@@else@@@null | | Get Image Null Value | Return the null value of the current image. It is also possible to specify an image whose corresponding null value will be retrieved. \\ The use of null without specifying an image "​poisons"​ the expression evaluation forcing the expression result to be invalid. | null \\ null(IMAGE) | if@@@i1@@@>​@@@2@@@then@@@i1@@@else@@@null \\ if@@@null(i2)@@@>​@@@2@@@then@@@1@@@else@@@null |
 | Is Null | Return 1, if the given expression is null, and 0, otherwise. Can also be used to test whether the result of any expression is invalid or not. | isNull(EXPR) | if@@@not@@@isNull(i1)@@@then@@@i1@@@else@@@i2 | | Is Null | Return 1, if the given expression is null, and 0, otherwise. Can also be used to test whether the result of any expression is invalid or not. | isNull(EXPR) | if@@@not@@@isNull(i1)@@@then@@@i1@@@else@@@i2 |
Line 86: Line 86:
 Lookup table operators return the value corresponding to a given key according to a rule-operator. ​ Lookup table operators return the value corresponding to a given key according to a rule-operator. ​
  
-They have the following syntax: \\ @@@@@@@@@TABLE[N@@@] \\ where: \\ @@@@@@@@@TABLE is a table identifier corresponding to a **[[Lookup Table Type|lookup table]]**. //Beware that, if the identifier ​corresponds ​to a [[Table Type|table]],​ an error will be reported//; \\ @@@@@@@@@N is the rule-operator.+They have the following syntax: \\ @@@@@@@@@TABLE[N@@@] \\ where: \\ @@@@@@@@@TABLE is a table identifier corresponding to a **[[Lookup Table Type|lookup table]]**. //Beware that, if the identifier ​is bound to a [[Table Type|table]],​ an error will be reported//; \\ @@@@@@@@@N is the rule-operator.
  
 ^ Operator ^ Description ^ Syntax ^ Usage Example ^ ^ Operator ^ Description ^ Syntax ^ Usage Example ^
-| Get Table Value | Return the table value in the key position of the table | TABLE[EXPR] | t2[i1@@@+@@@2] | +| Get Table Value | Return the table value associated with the EXPR key in the table | TABLE[EXPR] | t2[i1@@@+@@@2] | 
-| Get Table Equal Lower Bound Value | Return the table value in the greater key less than or equal to the key position of the table. | TABLE[<​nowiki><​=</​nowiki>​@@@EXPR] \\ <​del>​TABLE{EXPR}</​del>​ | t2[<​nowiki><​=</​nowiki>​@@@14] \\ <​del>​t2{14}</​del>​ | +| Get Table Equal Lower Bound Value | Return the table value associated with the greater key less than or equal to the EXPR key in the table. | TABLE[<​nowiki><​=</​nowiki>​@@@EXPR] \\ <​del>​TABLE{EXPR}</​del>​ | t2[<​nowiki><​=</​nowiki>​@@@14] \\ <​del>​t2{14}</​del>​ | 
-| Get Table Lower Bound Value | Return the table value in the greater key less than the key position of the table. | TABLE[<​@@@EXPR] | t2[<​@@@i1@@@+@@@2] | +| Get Table Lower Bound Value | Return the table value associated with the greater key less than the EXPR key in the table. | TABLE[<​@@@EXPR] | t2[<​@@@i1@@@+@@@2] | 
-| Get Table Equal Upper Bound Value | Return the table value in the lesser key greater than or equal to the key position of the table. | TABLE[>​=@@@EXPR] | t2[>​=@@@i1@@@+@@@i3] | +| Get Table Equal Upper Bound Value | Return the table value associated with the lesser key greater than or equal to the EXPR key in the table. | TABLE[>​=@@@EXPR] | t2[>​=@@@i1@@@+@@@i3] | 
-| Get Table Upper Bound Value | Return the table value in the lesser key greater than the key position of the table. | TABLE[>​@@@EXPR] | t2[>​@@@i7] | +| Get Table Upper Bound Value | Return the table value associated with lesser key greater than the EXPR key in the table. | TABLE[>​@@@EXPR] | t2[>​@@@i7] | 
-| Get Table Closest Value | Return the table value in the key closest to the key position of the table. | TABLE[><​@@@EXPR] | t2[><​@@@3@@@+@@@i7] | +| Get Table Closest Value | Return the table value associated with the key closest to the EXPR key in the table. | TABLE[><​@@@EXPR] | t2[><​@@@3@@@+@@@i7] | 
-| Get Table Interpoled ​Value | Return a linear ​interpoled ​value drawn through the neighbor keys of the key position of the table. | TABLE[/​@@@EXPR] | t2[/@@@i2] |+| Get Table Interpolaled ​Value | Return a linear ​interpolated ​value drawn through the neighbor keys of the EXPR key in the table. | TABLE[/​@@@EXPR] | t2[/@@@i2] |
 | Test Table Key | Return 1, if expression corresponds to a key stored in the table, and 0, otherwise. | TABLE[?​@@@EXPR] \\ TABLE[=?​@@@EXPR] \\ TABLE[==?​@@@EXPR] | t2[?@@@i2] \\ t2[=?@@@i2] |  | Test Table Key | Return 1, if expression corresponds to a key stored in the table, and 0, otherwise. | TABLE[?​@@@EXPR] \\ TABLE[=?​@@@EXPR] \\ TABLE[==?​@@@EXPR] | t2[?@@@i2] \\ t2[=?@@@i2] | 
 | Get Table Value Using Predefined Name | Return the table value bound to a key corresponding to a predefined name. //This can only used to retrieve results produced by [[Extract Map Attributes]] e [[Extract Lookup Table Attributes]]. The documentation of these operators provides a list of all supported predefined names.// | TABLE["​NAME"​] | t2["​cellArea"​] | | Get Table Value Using Predefined Name | Return the table value bound to a key corresponding to a predefined name. //This can only used to retrieve results produced by [[Extract Map Attributes]] e [[Extract Lookup Table Attributes]]. The documentation of these operators provides a list of all supported predefined names.// | TABLE["​NAME"​] | t2["​cellArea"​] |
Line 103: Line 103:
 Table operators return the value corresponding to a given set of keys.  Table operators return the value corresponding to a given set of keys. 
  
-They have the following syntax: \\ @@@@@@@@@TABLE[@@@[@@@]@@@[@@@]@@@] \\ where: \\ @@@@@@@@@TABLE is a table identifier corresponding to a **[[Table Type|table]]**. //Beware that, if the identifier ​corresponds ​to a [[Lookup Table Type|lookup table]], an error will be reported//;+They have the following syntax: \\ @@@@@@@@@TABLE[@@@[@@@]@@@[@@@]@@@] \\ where: \\ @@@@@@@@@TABLE is a table identifier corresponding to a **[[Table Type|table]]**. //Beware that, if the identifier ​is bound to a [[Lookup Table Type|lookup table]], an error will be reported//;
  
 The expressions representing the set of keys must be separated by commas. ​ The expressions representing the set of keys must be separated by commas. ​
  
 ^ Operator ^ Description ^ Syntax ^ Usage Example ^ ^ Operator ^ Description ^ Syntax ^ Usage Example ^
-| Get Table Value At Default Column | Return the table value corresponding to the set of keys at the first data column. | TABLE[@@@[EXPR,​@@@EXPR,​@@@EXPR,​@@@...@@@]@@@] | t2[@@@[i1@@@+@@@2,​@@@i2/​2,​@@@t1[v2]]@@@] | +| Get Table Value At Default Column | Return the table value associated with the set of keys in the first data column. | TABLE[@@@[EXPR,​@@@EXPR,​@@@EXPR,​@@@...@@@]@@@] | t2[@@@[i1@@@+@@@2,​@@@i2/​2,​@@@t1[v2]]@@@] | 
-| Get Table Value At Named Column | Return the table value corresponding to the set of keys at the column named by the given name. | TABLE[@@@[EXPR,​@@@EXPR,​@@@EXPR,​@@@...@@@]@@@[@@@NAME@@@]@@@] | t2[@@@[i1@@@+@@@2,​@@@i2/​2,​@@@t1[v2]]@@@[@@@"​Area_In_Hectares"​@@@]@@@] | +| Get Table Value At Named Column | Return the table value associated with the set of keys in the column named by the given name. | TABLE[@@@[EXPR,​@@@EXPR,​@@@EXPR,​@@@...@@@]@@@[@@@NAME@@@]@@@] | t2[@@@[i1@@@+@@@2,​@@@i2/​2,​@@@t1[v2]]@@@[@@@"​Area_In_Hectares"​@@@]@@@] | 
-| Get Table Value At Column Index | Return the table value corresponding to the set of keys at the column indexed by the given expression. | TABLE[@@@[EXPR,​@@@EXPR,​@@@EXPR,​@@@...@@@]@@@[@@@EXPR@@@]@@@] | t2[@@@[i1@@@+@@@2,​@@@i2/​2,​@@@t1[v2]]@@@[@@@v1+2@@@]@@@] |+| Get Table Value At Column Index | Return the table value associated with the set of keys in the column indexed by the given expression. | TABLE[@@@[EXPR,​@@@EXPR,​@@@EXPR,​@@@...@@@]@@@[@@@EXPR@@@]@@@] | t2[@@@[i1@@@+@@@2,​@@@i2/​2,​@@@t1[v2]]@@@[@@@v1+2@@@]@@@] |
 ==== Image Neighborhood Functions ==== ==== Image Neighborhood Functions ====
  
 Neighborhood operators return the value of an operation within a defined neighborhood window. Neighborhood operators return the value of an operation within a defined neighborhood window.
  
-They have the following syntax: \\ @@@@@@@@@nbN(IMAGE,​@@@h,​@@@w,​@@@y,​@@@x) \\ where: \\ @@@@@@@@@N is the operator name; \\ @@@@@@@@@IMAGE is an image identifier; \\ @@@@@@@@@h is the number of window lines; \\ @@@@@@@@@w is the number of window columns; \\ @@@@@@@@@y is the line where the window center is anchored at the image; \\ @@@@@@@@@x is the column where the window center is anchored at the image.+They have the following syntax: \\  
 +@@@@@@@@@nbN(IMAGE,​@@@h,​@@@w,​@@@y,​@@@x) \\  
 + 
 +where: \\  
 +@@@@@@@@@N is the operator name; \\  
 +@@@@@@@@@IMAGE is an image identifier; \\  
 +@@@@@@@@@h is the number of window lines; \\  
 +@@@@@@@@@w is the number of window columns; \\ 
 +@@@@@@@@@y is the line where the window center is anchored at the image; \\  
 +@@@@@@@@@x is the column where the window center is anchored at the image.
  
 The calculation usually includes the center of the window. The calculation usually includes the center of the window.
Line 122: Line 131:
  
 <WRAP center round box 80%> <WRAP center round box 80%>
-The window anchor (y and x) can be omitted when the window center is anchored at the current line and column. The shortened syntax is: \\ @@@@@@@@@nbN(IMAGE,​@@@h,​@@@w)+The window anchor (y and x) can be omitted when the window center is anchored at the current line and column. The shortened syntax is: **@@@@@@@@@nbN(IMAGE,​@@@h,​@@@w)**
 </​WRAP>​ </​WRAP>​
  
Line 137: Line 146:
 | Standard Deviation | Returns the standard deviation of the neighbor non-null cells according to the expression: \\ @@@<m 8>sigma = sqrt{{1/​{n-1}}sum{i=1}{n}{(x_i-X)^2}}</​m>​ \\ where \\ @@@x<​sub>​1</​sub>,​ x<​sub>​2</​sub>,​ ..., x<​sub>​i</​sub>​ are the neighbor cells; \\ @@@X is the mean of the neighbor cells. | nbStdDev() | nbStdDev(i2,​@@@3,​@@@3,​@@@line+1,​@@@column) | | Standard Deviation | Returns the standard deviation of the neighbor non-null cells according to the expression: \\ @@@<m 8>sigma = sqrt{{1/​{n-1}}sum{i=1}{n}{(x_i-X)^2}}</​m>​ \\ where \\ @@@x<​sub>​1</​sub>,​ x<​sub>​2</​sub>,​ ..., x<​sub>​i</​sub>​ are the neighbor cells; \\ @@@X is the mean of the neighbor cells. | nbStdDev() | nbStdDev(i2,​@@@3,​@@@3,​@@@line+1,​@@@column) |
  
-There is one additional image neighborhood operator that uses a slightly different syntax: \\ @@@@@@@@@nbConvol(IMAGE,​@@@TABLE,​@@@h,​@@@w,​@@@y,​@@@x) \\ where: \\ @@@@@@@@@IMAGE is an image identifier; \\ @@@@@@@@@TABLE is a table identifier; \\ @@@@@@@@@h is the number of window lines; \\ @@@@@@@@@w is the number of window columns; \\ @@@@@@@@@y is the line where the window center is anchored at the image; \\ @@@@@@@@@x is the column where the window center is anchored at the image.+==== Image Neighborhood Indexing Functions ==== 
 + 
 +Neighborhood (Ref) operators finds the value of an operation within a defined neighborhood window, this value is then used as an index to retrieve data either from a table or from a secondary image. 
 + 
 +They have the following syntax: \\  
 +@@@@@@@@@nbN(IMAGE,​ @@@h, @@@w, TABLE, @@@y, @@@x)\\ 
 +@@@@@@@@@nbN(IMAGE,​ @@@h, @@@w, IMAGE2, @@@y, @@@x)\\ 
 + 
 +where: \\  
 +@@@@@@@@@N is the operator name; \\  
 +@@@@@@@@@IMAGE is an Image identifier; \\  
 +@@@@@@@@@h is the number of window lines; \\  
 +@@@@@@@@@w is the number of window columns; \\ 
 +@@@@@@@@@TABLE is a LookupTable containing the values associated with each one of the Indices (Key = Index); \\  
 +@@@@@@@@@IMAGE2 is an Image identifier whose cell values will be returned (Cell Coordinate = Index); \\  
 +@@@@@@@@@y is the line where the window center is anchored at the image; \\  
 +@@@@@@@@@x is the column where the window center is anchored at the image. 
 + 
 +The calculation usually includes the center of the window. 
 +Even-sided windows have the center displaced toward the top left corner. 
 + 
 +<WRAP center round box 80%> 
 +The window anchor (y and x) can be omitted when the window center is anchored at the current line and column. The shortened syntax is: **@@@@@@@@@nbN(IMAGE,​@@@h,​@@@w,​@@@TABLE/​IMAGE2)** 
 +</​WRAP>​ 
 + 
 +^ Operator ^ Description ^ Syntax ^ Usage Example ^ 
 +| MinRef | Finds the minimum value of the neighbor non-null cells. This value is then used as an Index to retrieve the resulting value from specified table or image. | nbMinRef() | nbMinRef(i4,​@@@2,​@@@3,​@@@t1,​@@@line,​@@@column) | 
 +| MaxRef | Finds the maximum value of the neighbor non-null cells. This value is then used as an index to retrieve the resulting value from specified table or image. | nbMaxRef() | nbMaxRef(i4,​@@@2,​@@@3,​@@@i1,​@@@line,​@@@column) | 
 + 
 +There is one additional image neighborhood operator that uses a slightly different syntax: \\  
 +@@@@@@@@@nbConvol(IMAGE,​@@@TABLE,​@@@h,​@@@w,​@@@y,​@@@x) \\  
 +where: \\  
 +@@@@@@@@@IMAGE is an image identifier; \\  
 +@@@@@@@@@TABLE is a table identifier; \\  
 +@@@@@@@@@h is the number of window lines; \\  
 +@@@@@@@@@w is the number of window columns; \\  
 +@@@@@@@@@y is the line where the window center is anchored at the image; \\  
 +@@@@@@@@@x is the column where the window center is anchored at the image.
  
 nbConvol applies a convolution over IMAGE using the values stored on TABLE as the convolution coeficients. The table entries, from 1 to X, are mapped into the corresponding image values from top-down, left-to-right. The following examples ilustrated: nbConvol applies a convolution over IMAGE using the values stored on TABLE as the convolution coeficients. The table entries, from 1 to X, are mapped into the corresponding image values from top-down, left-to-right. The following examples ilustrated: