Border pattern is resolution independent
borderPattern(ptype)
is the output of onBPBoundary
the output is useful as an index to the output of baseNeighbours. It will return the correct neighbouring base pixel in each direction. The 0 indicates to stay in current BP.