Very simple identification function
Created generic filtering function

filter_image will accept any function that returns a boolean as an
argument and generate a filtered version of the image (suitable for
ndimage.label) based on it. This means we can use a variety of
identification functions and swap them in and out easily.