nanshe/advanced_image_processing.py: Perform erosion earlier to cut down the number of label images that need to be processed.