Scala script to select focussed slices for each cell in an image.