It looks like there is a requirement on the minimum number of z slices. "ValueError: Input array must be at least length 32 in first dimension" When batch-processing on a large set of images, it would be great to skip the "bad" image and raise a flag, rather than assertion fail.