morphogen.analysis.fractal

Fractal dimension of a phase by box counting (Minkowski-Bouligand dimension).

morphogen.analysis.fractal.box_counting(image, phase: int = 1, sizes=None) → dict[source]

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).

The default sizes are the powers of two from 1 to an eighth of the smallest edge of the image; axes of one voxel (2D images) are not divided. For a fractal aggregate, use sizes between the particle size and the size of the clusters.

morphogen.analysis.fractal.box_dimension(image, phase: int = 1, sizes=None) → float[source]

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