created a means to ensure contiguous segmaps through region growing