scipy.ndimage.morphology.binary_propagation(input, structure=None, mask=None, output=None, border_value=0, origin=0)

Multi-dimensional binary propagation with the given structure.

An output array can optionally be provided. The origin parameter controls the placement of the filter. If no structuring element is provided an element is generated with a squared connectivity equal to one. If a mask is given, only those elements with a true value at the corresponding mask element are.

This function is functionally equivalent to calling binary_dilation with the number of iterations less then one: iterative dilation until the result does not change anymore.