bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / graph / _rag / RAG
class
skimage.graph._rag:RAG
source: /dev/scikit-image/src/skimage/graph/_rag.py :108
Signature
class RAG ( label_image = None , connectivity = 1 , data = None , ** attr ) Members
Summary
The Region Adjacency Graph (RAG) of an image, subclasses networkx.Graph.
Parameters
label_image: array of intAn initial segmentation, with each region labeled as a different integer. Every unique value in
label_imagewill correspond to a node in the graph.connectivity: int, in range [1, `label_image.ndim`], optionalThe connectivity between pixels in
label_image. For a 2D image, a connectivity of 1 corresponds to immediate neighbors up, down, left, and right, while a connectivity of 2 also includes diagonal neighbors. See scipy.ndimage.generate_binary_structure.data: :obj:`networkx.Graph` specification, optionalInitial or additional edges to pass to
networkx.Graphconstructor. Valid edge specifications include edge list (list of tuples), NumPy arrays, and SciPy sparse matrices.**attr: Any, optionalAdditional attributes to add to the graph.
Aliases
-
skimage.graph.RAG