ewoksndreg.math.crop.crop_edges#

ewoksndreg.math.crop.crop_edges(stack)[source]#

Calculates the slices such that they correspond to cropping out NaN values

param stack: Stack of translated images of form [N,H,W] with nan values in the empty sections

returns: two slices which crop the individual images to remove nan values

Parameters:

stack (ndarray)

Return type:

Tuple[slice, slice]