morphogen.analysis

Morphological measurements on voxel images.

Public names

  • AxisCovariance — Covariance along the x, y and z axes.

  • AxisFunction — A function of the lags along the x, y and z axes (the covariance, the lineal-path and two-point cluster functions of morphogen.analysis.correlation).

  • Betti — Betti numbers and Euler characteristic of a phase.

  • Capacity — Choquet capacity T(K) of a phase for structuring elements of growing size: the radius of balls, the length of segments, the distance of pairs of points, the edge of cubes (sizes, in length units).

  • Components — Connected components of one phase.

  • DirectionalPercolation — Percolation of a phase of one image along directions (directional_percolation()).

  • Fabric — The MIL along the directions (unit vectors), the fabric tensor M, its principal MILs (decreasing) and their axes (columns), the degree of anisotropy.

  • Fire — Forest fire lit on a face of an image (burn()).

  • Granulometry — Openings of a phase by balls of increasing radius.

  • HoleEffect — The first minimum of the covariance below its plateau p^2 along the x, y and z axes: its lags (physical units; NaN where the covariance has none) and values.

  • Minkowski — Densities of the four Minkowski functionals of a phase: V_V, S_V, the integral of mean curvature M_V ((1/2) int (1/R1 + 1/R2) dS per unit volume) and the Euler characteristic chi_V.

  • MorphologicalCovariance — Mean of the erosion (or dilation) of a grey-level image by pairs of points along the x, y and z axes; volume_fraction holds the mean of the image.

  • Particles — The particles of a phase: labels (0 outside the phase, else the number of the particle from 1), their volumes and centroids (n x 3, in the box), their weights (1; in an image that is not periodic, 0 for a particle cut by the frame and the factor of Miles and Lantuéjoul for the others) and the volume of the image.

  • PercolationAnisotropy — Percolation thresholds of a family along directions (percolation_anisotropy()).

  • PercolationExponent — Critical exponent of an effective property at a percolation threshold (percolation_exponent()).

  • PercolationScaling — Finite-size scaling of a percolation threshold (percolation_scaling()).

  • PercolationThreshold — Estimate of a percolation threshold.

  • PoreSizes — The pore-size function of a phase: the bin edges delta, the exceedance F at the edges, the density P in the bins, and the first two moments of δ.

  • PowerLawTail — The tail p(x) ~ x^-exponent of a sample above x_min: its n_tail values, the standard error of the exponent and the Kolmogorov-Smirnov distance of the fit.

  • RigidityThreshold — Finite-size scaling of the rigidity threshold of a phase, the fraction from which its elastic moduli do not vanish (rigidity_threshold()).

  • Sections — The sections of a phase by the planes normal to axis: their equivalent radii sqrt(area / pi), their weights (1, or the Miles–Lantuéjoul factor of a section inside the frame of a non-periodic image) and the total area of the planes.

  • Unfolding — A 3D size distribution recovered from sections: the short semi-axes of its classes (radii, on the mean scale of the directions) and their numbers per unit volume (density, the mean of the directions); per direction (axes), the densities (directional), the largest short semi-axis a_max (scales), the measured and refolded areal densities of the 2D classes and the relative L1 error of the refolding.

  • betti_numbers — Betti numbers of phase in 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.

  • boundary_density — Area of the boundaries between cells per unit volume, for a label image.

  • box_counting — Number N(s) of boxes of edge s voxels that contain the phase, and the dimension D = -d log N / d log s (least-squares slope over the sizes).

  • box_dimension — Box-counting dimension of a phase (see box_counting()).

  • burn — The forest fire of the phase phase of a 3-D image along axis (the burning algorithm of Herrmann, Hong & Stanley 1984): the phase voxels of the face at 0 normal to the axis catch fire at time 0, and at each step the fire spreads to the unburnt phase voxels among the connectivity neighbours (6: faces; 18: and edges; 26: and corners) of those burning, the transverse directions wrapping around a periodic image (periodic, by default that of the image), never the axis. The phase percolates along the axis when the fire reaches the opposite face, at the step time: the chemical distance between the faces, the number of steps of the shortest path through the phase (n - 1 for a straight channel n voxels long). The breadth-first burning, compiled, queues each voxel once and stops at the end of that step, unless full asks for the whole clusters lit on the face and their burning times; it costs the voxels burnt, where connected_components() labels the whole image, and decides as its flags percolating on open boundaries. A planar image (one voxel along z) burns in its plane, along x or y, through 4 (connectivity 4 or 6) or 8 (8, 18 or 26) neighbours; burn_along() burns along any direction.

  • burn_along — The forest fire of the phase phase of an image along direction (a vector, in physical units for anisotropic voxels; in the plane of a planar image), across the core of the image along it: the cylinder (a square in 2-D) of the voxels whose centres lie within R of the axis through the centre of the box along the direction and within R of the centre along it, 2 R long and across, R = D / (2 sqrt 2) for the diameter D of the ball (disc) inscribed in the box, its smallest edge. The phase voxels of the core within a step of a neighbour of crossing its lower cap catch fire at time 0 (one layer along an axis, as the face of burn(); the cap is the plane normal to the direction at -R), the fire spreads through the connectivity neighbours inside the core, and the phase percolates along the direction when it reaches those of the upper cap, at the step time, the chemical distance across the core (Fire as burn(); times -1 outside the core too).

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

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

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

  • choquet_capacity — Choquet capacity T(K) = P(K hits A) of phase (the set A) for structuring elements K of the given sizes (length units), estimated as the volume fraction of the dilation of A by K.

  • chord_lengths — Lengths of the chords of phase along axis (physical units).

  • closing — (A (+) K') (-) K: the complement of the opening of the complement.

  • connected_components — The connected components of a phase of an image (connectivity: 6, 18 or 26 neighbours) and whether they percolate along each axis, through the faces of a periodic image (periodic, by default that of the image); their labels with return_labels.

  • connectivity_density — Number of independent tunnels per unit volume, b1 / V.

  • consistent_shape — The shape factors (b/a, c/a) for which shape_consistency() is the same in the three directions: r_D^4 s_hat_D common to them, a linear system in the squared shape factors (b/a = (r_x / r_y)^2, c/a = (r_x / r_z)^2 for the default axes). It is ill-conditioned for axes far from the planes of the grid.

  • covariance — Covariance of phase along the three axes, for lags 0..max_lag voxels.

  • covariance_map — Full 3D covariance of a periodic image, zero lag at the centre (fftshift order).

  • covariance_minima — The first local minimum of the covariance of phase along each axis after it falls below its plateau, refined by the parabola through the three nearest lags.

  • crofton_weights — Solid-angle weights (summing to 1) of the physical directions d * spacing.

  • dilation — Indicator of A (+) K': the voxels x where K_x hits the phase (K as in choquet_capacity(), the element anchored at its first point or its centre).

  • directional_percolation — Percolation of the phase phase of one image along each of directions: the fire of burn_along() across the core of the image along each, a direction and its opposite alike. directions are "lattice" (the axes and the diagonals of the grid: 4 directions in 2-D, 13 in 3-D, in physical units for anisotropic voxels, as for the mean intercept length of fabric_tensor()), "axes", a number of directions sampled (in 2-D at equal angles over half a turn from x; in 3-D on a Fibonacci spiral over the half sphere z > 0, quasi-uniform), or vectors (rows of 2 or 3 components).

  • erosion — Indicator of A (-) K': the voxels x where K_x lies inside the phase (outside a non-periodic box counts as outside the phase).

  • euler_characteristic — Euler characteristic (number of components - tunnels + cavities) of phase, 6-connected (its complement 26-connected): vertices - edges + squares - cubes of the complex whose vertices are the voxels of the phase, edges their pairs of face neighbours, squares and cubes their 2 x 2 and 2 x 2 x 2 blocks (Ohser & Mücklich 2000). Periodic images are counted on the torus. Objects closer than a voxel touch on the image: the estimate is biased by their contacts (for random objects, about half the number of pairs closer than a voxel).

  • fabric_tensor — The MIL fabric tensor of phase (see the module).

  • geodesic_distance — Length of the shortest path inside phase (26-connected voxels, Euclidean steps between voxel centres) from the face axis = 0 of the box to every voxel (inf: not reached; NaN outside the phase).

  • geometric_tortuosity — Mean length of the shortest paths through phase between the faces normal to axis, divided by the edge of the box (inf when the phase does not percolate).

  • granulometry — Openings of phase by balls of the radii given (physical units; default: steps of half a voxel up to the largest inscribed ball). The opening of radius r is the union of the balls of radius r (the voxels closer than r to their centre) whose centre is at least r from the voxels outside the phase, as in the local thickness of Hildebrand & Rüegsegger (1997): a layer of n voxels has thickness n voxels. Each voxel gets the largest radius whose opening keeps it, so that the fractions kept decrease with the radius (discrete Euclidean balls do not make exact granulometries).

  • indicator — Indicator of phase (boolean), or the partial-volume field of a float image.

  • interface_density — Area per unit volume of the boundaries between different values of data.

  • lineal_path — Lineal-path function of phase along the three axes, for the lags 0..max_lag voxels (half the image by default): an AxisFunction.

  • local_thickness — Local thickness of every voxel of phase (0 elsewhere).

  • mean_chord_length — Mean chord length of phase over the three axes (all chords pooled).

  • mean_curvature_density — 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).

  • mean_intercept_length — Unit directions (13 x 3) and the mean intercept length of phase along each.

  • measure — Evaluate the named measures and merge their results.

  • minkowski — The Minkowski densities of a phase of an image: its volume fraction, specific surface, density of Euler characteristic and density of mean curvature.

  • minkowski_curves — Densities of the four Minkowski functionals of the excursion sets {Z > u} of a grey-level image for the levels thresholds: the volume fraction, the specific surface, the integral of mean curvature and the Euler characteristic per unit volume.

  • morphological_covariance — E[min(Z(x), Z(x + h))] (erosion by pairs of points; operation="dilation": the maximum) of a grey-level image along the three axes, lags 0..max_lag voxels (default half the box). For a binary image the erosion gives the covariance.

  • opening — (A (-) K') (+) K: the union of the translates of K inside the phase.

  • particle_sizes — The particles of phase in the volume of an image (see the module): its 26-connected parts and, with separate, those that touch split by the watershed of their distance map from its maxima of prominence at least prominence (physical units; default half a voxel). The particles of equivalent radius below min_radius are left out. On periodic images each particle counts once, whole across the faces; otherwise those cut by the frame have a zero weight and the others the factor of Miles and Lantuéjoul.

  • percolation_anisotropy — Percolation thresholds of a family of microstructures along directions, and their anisotropy: the fractions at which the phase phase of generate(fraction, rng) (as for percolation_threshold()) percolates along each of directions (as for directional_percolation(): across the core of the image along each).

  • percolation_exponent — Critical exponent of the conductivity (t) or of the elastic moduli (f) of the percolating phase of a family of microstructures, by the finite-size scaling of the property at its percolation threshold, and optionally by a sweep above it.

  • percolation_scaling — Finite-size scaling of the percolation threshold of a family of microstructures: the thresholds p½(L) of percolation_threshold() in boxes of each of the sizes L, generate(fraction, rng, size) returning an image size voxels per edge, extrapolated to the infinite medium.

  • percolation_threshold — Percolation threshold of a family of microstructures: the fraction at which the probability that the phase phase of generate(fraction, rng) percolates crosses 1/2.

  • phase_fractions — Volume fraction of every phase index present in an integer image.

  • pore_size_function — The pore-size function of phase (by default the pores, phase 0): the law of the distance from its points to the other phase (see the module).

  • power_law_tail — The power-law tail of a sample (see the module): its exponent by maximum likelihood above x_min, given or chosen by the Kolmogorov-Smirnov distance among the values that leave at least min_tail of them in the tail (at most CANDIDATES of them, quantiles of the sample). discrete: integer values (at least 1), the law x^-a / zeta(a, x_min).

  • radial_distribution — The radial distribution function g(r) of points in a periodic box of edges box: the centres of the bins of r (up to r_max, a quarter of the smallest edge by default) and g in them.

  • rigidity_threshold — Rigidity threshold of a phase of a family of microstructures: the fraction from which its elastic moduli by the FFT solver do not vanish, the other phases void, by the finite-size scaling of the fractions at which half the realizations of boxes of each of the sizes bear.

  • saltykov_matrix — P[I - 1, J - 1]: the probability that a particle of the 3D class I (largest section radius I delta) is cut in a section of the 2D class J (radii between (J - 1) delta and J delta), classes counted upward; its rows sum to 1.

  • section_euler_density — Euler characteristic per unit area of the plane sections of phase normal 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.

  • section_scales — (kappa, h): an ellipsoid of short semi-axis a, shape factors shape = (b/a, c/a) and axes rotation (columns: the directions of its axes a, b, c in the frame of the image; default x, y, z) is cut by the planes normal to axis in sections of equivalent radius at most kappa a, and spans h a across them. From a fabric tensor f: shape = (f.ratios[1], f.ratios[0]), rotation = f.axes[:, ::-1].

  • section_sizes — The sections of phase by the planes of voxels normal to axis (8-connected pixels). separate: touching sections are split by a watershed of their distance map from its maxima of prominence at least prominence (physical units, default half a pixel), in the manner of the binary watershed of Fiji. Sections of equivalent radius below min_radius are dropped. On periodic images each section counts once, whole across the faces; otherwise the sections cut by the frame are dropped and the others weighted by n1 n2 / ((n1 - 1 - w1)(n2 - 1 - w2)) for their extents w in pixels (Miles–Lantuéjoul).

  • shape_consistency — The mean section radius over kappa in each direction (the axes of sections, a list of Sections or a mapping axis -> mean radius): (pi / 4) m2 / m1 of the short semi-axes in every direction when the particles have the given shape.

  • specific_surface — Interface area of phase per unit volume of the image (Crofton estimate).

  • structure_factor — The structure factor S(k) of points in a periodic box, averaged over the wave vectors 2π n / L (n integer, not all zero) in bins of |k| up to k_max (twenty times the smallest wave number by default): the centres of the bins with wave vectors and S in them.

  • two_point_cluster — Two-point cluster function of phase along the three axes (face-connected clusters), for the lags 0..max_lag voxels: an AxisFunction.

  • unfold_sections — The size distribution of particles of a common shape (shape, rotation: see section_scales()) from their sections normal to one or several axes (a Sections or a list), as Degdeg & Dirrenberger: in each direction the sections up to the percentile of their radii, r_max, fall in bins classes of width r_max / bins, and the classes largest 3D classes (short semi-axes I / bins of a_max = r_max / kappa) come from Saltykov’s recursion; their densities are averaged over the directions class by class. classes=None: the number that minimizes the summed L1 error of refolding the mean through each direction (several directions: with one, the refolding of all the classes is exact).

  • volume_fraction — Volume fraction of phase (mean of the partial volumes for float images).

  • wrapping — Whether a component of a phase of an image wraps around the periodic box along each axis (connectivity: 6, 18 or 26 neighbours): a cycle of neighbours through the faces winds around the axis, so that the tiled component is a cluster unbounded along it, the percolation of a periodic medium. Joining the two faces normal to the axis inside the box (the flags percolating of connected_components()) neither implies it (a staircase from face to face closes into no cycle) nor follows from it (a helix through the faces normal to y wraps along x and y and joins no pair of faces).

Modules