I thought I'd see if anyone has any canned functions/methods or "good ideas" before I wrote code to do this. Given a 2D bilevel (zero's and non-zero values) array (image), a mask of the same size is returned where each element (pixel) is given a unique region/blob value. Each region/blob is a set of non-zero elements (pixels) surrounded by zeroes. This is done by the LABEL_REGION function in IDL.