does not compile region growing segmentation on groovy