# cells = try(CustomSubset(group.info, min_n=50, max_total=2000))
# if (inherits(cells, 'try-error')) {
# cells <- c(cells.1, cells.2)
# }
img <- tryCatch(
{
.GetImageSize(slide.file)
},
error = function(e) {
img.path <- list.files(slide.file, full.names=TRUE)[[1]] #Assuming all scan images of the same batch is of similar size, we only need to take the first one
img <- .GetImageSize(img.path)
return(img)
})