morphogen.analysis.topology¶
Topology of the phases of voxel images: Betti numbers, connectivity density, and the Euler characteristic of plane sections, which gives the integral of mean curvature.
The phase is 6-connected and its complement 26-connected, as in
morphogen.analysis.morphology.euler_characteristic(), so that the numbers agree:
chi = b0 - b1 + b2 with b0 the connected components, b1 the independent
tunnels (handles, the “connectivity” of trabecular bone) and b2 the cavities. The box
is seen as a part of space (outside the box: the complement), even for periodic images,
whose components cut by the faces are counted once per piece.
- class morphogen.analysis.topology.Betti(b0: int, b1: int, b2: int, euler: int)[source]¶
Bases:
objectBetti numbers and Euler characteristic of a phase.
- morphogen.analysis.topology.betti_numbers(image, phase: int = 1) Betti[source]¶
Betti numbers of
phasein the box: components (6-connected), cavities (26-connected components of the complement that do not reach the faces) and, by the Euler-Poincaré formula, tunnels.
- morphogen.analysis.topology.connectivity_density(image, phase: int = 1) float[source]¶
Number of independent tunnels per unit volume,
b1 / V.
- morphogen.analysis.topology.section_euler_density(image, phase: int = 1, *, periodic=None) float[source]¶
Euler characteristic per unit area of the plane sections of
phasenormal to the three axes (4-connected in the planes: pixels - pairs of neighbours + 2 x 2 blocks), averaged over the axes. Periodic images are counted on the tori of the sections.
- morphogen.analysis.topology.mean_curvature_density(image, phase: int = 1, *, periodic=None) float[source]¶
Integral of mean curvature per unit volume,
M_V = 2 pi chi_A(Crofton: the Euler characteristic per unit area of plane sections; exact on average for isotropic structures, the mean of three orthogonal planes otherwise).