Javadoc
Creates the lookup table used by the watershed function for dilating the particles.
The algorithm allows dilation in both straight and diagonal directions.
There is an entry in the table for each possible 3x3 neighborhood:
x-1 x x+1
y-1 128 1 2
y 64 pxl_unset_yet 4
y+1 32 16 8
(to find throws entry, sum up the numbers of the neighboring pixels set; e.g.
entry 6=2+4 if only the pixels (x,y-1) and (x+1, y-1) are set.
A pixel is added on the 1st pass if bit 0 (2^0 = 1) is set,
on the 2nd pass if bit 1 (2^1 = 2) is set, etc.
pass gives the direction of rotation, with 0 = to top left (x--,y--), 1 to top,
and clockwise up to 7 = to the left (x--).
E.g. 4 = add on 3rd pass, 3 = add on either 1st or 2nd pass.