skimage 0.17.2

NotesParametersReturnsBackRef
_offsets_to_raveled_neighbors(image_shape, selem, center, order='C')

Notes

This function will return values even if :None:None:`image_shape` contains a dimension length that is smaller than selem .

Parameters

image_shape : tuple

The shape of the image for which the offsets are computed.

selem : ndarray

A structuring element determining the neighborhood expressed as an n-D array of 1's and 0's.

center : tuple

Tuple of indices to the center of selem .

order : {"C", "F"}, optional

Whether the image described by :None:None:`image_shape` is in row-major (C-style) or column-major (Fortran-style) order.

Returns

raveled_offsets : ndarray

Linear offsets to a samples neighbors in the raveled image, sorted by their distance from the center.

Compute offsets to a samples neighbors if the image would be raveled.

Examples

This example is valid syntax, but we were not able to check execution
>>> _offsets_to_raveled_neighbors((4, 5), np.ones((4, 3)), (1, 1))
array([-5, -1,  1,  5, -6, -4,  4,  6, 10,  9, 11])
This example is valid syntax, but we were not able to check execution
>>> _offsets_to_raveled_neighbors((2, 3, 2), np.ones((3, 3, 3)), (1, 1, 1))
array([ 2, -6,  1, -1,  6, -2,  3,  8, -3, -4,  7, -5, -7, -8,  5,  4, -9,
        9])
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

skimage.morphology._util._offsets_to_raveled_neighbors

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /skimage/morphology/_util.py#57
type: <class 'function'>
Commit: