bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / morphology / _util / _validate_connectivity
function
skimage.morphology._util:_validate_connectivity
source: /dev/scikit-image/src/skimage/morphology/_util.py :7
Signature
def _validate_connectivity ( image_dim , connectivity , offset ) Summary
Convert any valid connectivity to a footprint and offset.
Parameters
image_dim: intThe number of dimensions of the input image.
connectivity: int, array, or NoneThe neighborhood connectivity. An integer is interpreted as in
scipy.ndimage.generate_binary_structure, as the maximum number of orthogonal steps to reach a neighbor. An array is directly interpreted as a footprint and its shape is validated against the input image shape.Noneis interpreted as a connectivity of 1.offset: tuple of int, or NoneThe coordinates of the center of the footprint.
Returns
c_connectivity: array of boolThe footprint (structuring element) corresponding to the input
connectivity.offset: array of intThe offset corresponding to the center of the footprint.
Raises
: ValueError:If the image dimension and the connectivity or offset dimensions don't match.
Aliases
-
skimage.morphology._util._validate_connectivity