{ } Raw JSON

bundles / skimage latest / 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 int

An initial segmentation, with each region labeled as a different integer. Every unique value in label_image will correspond to a node in the graph.

connectivity : int, in range [1, `label_image.ndim`], optional

The 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, optional

Initial or additional edges to pass to networkx.Graph constructor. Valid edge specifications include edge list (list of tuples), NumPy arrays, and SciPy sparse matrices.

**attr : Any, optional

Additional attributes to add to the graph.

Aliases

  • skimage.graph.RAG