connections_from_regions_and_dgrid
go-to Builds periodic window connections used with rag_from_connections in the main workflow.
compute.connections_from_regions_and_dgrid(
region_labels,
dgrid,
maxima,
ase_atoms,
wall_windows=True,
distance_threshold=1.0,
wall_thickness=2,
)Build region connections and window sites from labelled regions and the distance grid.
It takes a 3D array of region labels, a list of maxima, an ASE atoms object, and a distance threshold, and returns a list of connections between regions, and the centers of the windows between them
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| region_labels | The labels of the regions, as returned by the skimage.measure.label function | required | |
| maxima | the maxima of the image | required | |
| ase_atoms | ASE atoms object | required | |
| wall_windows | If True, then the windows on the wall are also calculated, defaults to True (optional) | True |
|
| distance_threshold | The distance threshold for the agglomerative clustering | 1.0 |
Returns
| Name | Type | Description |
|---|---|---|
| A list of connections between regions. |