Javadoc
create an array of offsets within a pixel array for directions in clockwise order:
0=(x,y-1), 1=(x+1,y-1), ... 7=(x-1,y)
Also creates further class variables:
width, height, and the following three values needed for storing coordinates in single ints for watershed:
intEncodeXMask, intEncodeYMask and intEncodeShift.
E.g., for width between 129 and 256, xMask=0xff and yMask = 0xffffff00 are bitwise masks
for x and y, respectively, and shift=8 is the bit shift to get y from the y-masked value
Returns as class variables: the arrays of the offsets to the 8 neighboring pixels
and the array maskAndShift for watershed