Parent Topic: Variables
Subscripts
It is possible to access the grey level values and attribute data for adjacent pixels by subscripting layer or attribute variables. The following diagram shows the subscript syntax and relationship to the pixel being currently processed (which is [ 0, 0]).

                [-1,-1]  [ 0,-1]  [ 1,-1]
                [-1, 0]  [ 0, 0]  [ 1, 0]
                [-1, 1]  [ 0, 1]  [ 1, 1]
Examples: %1.2[-1,-1], %1[1,1]

%x is equivalent to %x[0,0]. Subscripted pixels which are outside the bounds of the image are automatically assigned the value of the nearest pixel which is inside the image.

Note: it is NOT possible to assign a value to a subscripted pixel.


Parent Topic: Variables
About PCI Help Gateway