Reworked the perimeter labelling. Now uses the original segmented array to determine region indices.