bundles / skimage latest / skimage / morphology / _util / _offsets_to_raveled_neighbors
function
skimage.morphology._util:_offsets_to_raveled_neighbors
source: /dev/scikit-image/src/skimage/morphology/_util.py :167
Signature
def _offsets_to_raveled_neighbors ( image_shape , footprint , center , order = C ) Summary
Compute offsets to a samples neighbors if the image would be raveled.
Parameters
image_shape: tupleThe shape of the image for which the offsets are computed.
footprint: ndarrayThe footprint (structuring element) determining the neighborhood expressed as an n-D array of 1's and 0's.
center: tupleTuple of indices to the center of
footprint.order: {"C", "F"}, optionalWhether the image described by
image_shapeis in row-major (C-style) or column-major (Fortran-style) order.
Returns
raveled_offsets: ndarrayLinear offsets to a samples neighbors in the raveled image, sorted by their distance from the center.
Notes
This function will return values even if image_shape contains a dimension length that is smaller than footprint.
Examples
_offsets_to_raveled_neighbors((4, 5), np.ones((4, 3)), (1, 1)) _offsets_to_raveled_neighbors((2, 3, 2), np.ones((3, 3, 3)), (1, 1, 1))✓
Aliases
-
skimage.morphology._flood_fill._offsets_to_raveled_neighbors