morphogen.analysis.cells

Statistics of label images (cells of tessellations, grains).

Negative labels mark voxels outside every cell (e.g. the untransformed matrix of a partially crystallized structure): they are ignored.

morphogen.analysis.cells.cell_volumes(labels, n_cells: int | None = None) → ndarray[source]

Volume of every label 0..n_cells-1 (voxel counts times the voxel volume).

morphogen.analysis.cells.cell_adjacency(labels, periodic=None) → ndarray[source]

Pairs (a, b), a < b, of labels sharing at least one voxel face.

morphogen.analysis.cells.cell_neighbors(labels, periodic=None, n_cells: int | None = None) → ndarray[source]

Number of face-sharing neighbours of every label (voxel estimate).