ewoksndreg.math.crop.merge_crop_limits#

ewoksndreg.math.crop.merge_crop_limits(all_limits, intersection)[source]#

Merge several array limits either by taking the intersection or the envelop.

Parameters:
  • all_limits (List[Optional[List[Tuple[int, int]]]]) – several results of array_crop_limits

  • intersection (bool)

Return type:

Optional[List[Tuple[int, int]]]

Returns:

A 2-tuple for each array dimension [(lo0, hi0), (lo1, hi1), …] or None when the merged limits box is empty.