morphogen.models.osteons

Haversian (cortical) bone: osteons remodelled one after another.

Cortical bone is renewed by basic multicellular units that tunnel along the bone axis, resorb a cylinder of bone and refill it with concentric lamellae around a vascular (Haversian) canal: a secondary osteon, bounded by a cement line. Each new osteon cuts through the older ones, whose fragments, with the remains of older bone, form the interstitial bone (Currey 2002). The model is a dead-leaves model of aligned cylinders (Matheron 1968; Jeulin 1989): osteons of radius R arrive at Poisson positions of the cross-section in random order, the last on top; a point covered by none is interstitial bone. Within the top osteon, it lies in the canal (d < rho R), the cement line (d > R - c) or the lamellar bone in between (d: its distance to the axis of the osteon).

With lambda osteons per unit area chosen for a coverage p = 1 - exp(-lambda pi E[R^2]), the top osteon is an osteon weighted by its area, and a point falls in each of its parts with the share of its area (exact):

  • Haversian canals (the vascular porosity): p rho^2;

  • cement lines: p E[R^2 - max(R - c, rho R)^2] / E[R^2];

  • lamellar bone of the osteons: the rest of p; interstitial bone: 1 - p.

class morphogen.models.osteons.OsteonStructure(domain, axis, centres, radii, canal_ratio, cement, **kwargs)[source]

Bases: Microstructure

Osteons along axis: discs of the cross-section (centres, radii) in the order of their arrival, the last on top, with a canal of canal_ratio times their radius and a cement line of cement thickness.

property n_osteons: int
phase_level_sets_at(points, reach: float = inf) → dict[int, ndarray][source]

The level sets of the lamellar bone (1), cement lines (2), canals (3) and interstitial bone (0) at points: in the cross-section, the parts of each osteon not covered by later ones, and the space no osteon covers (see _osteon_levels()), within [-reach, reach] (default: the largest radius).

level_set_at(points, reach: float = inf) → ndarray[source]

The function of the lamellar bone (phase 1) at the points (phase_level_sets_at()).

contains(points) → ndarray[source]

Whether points lie in the lamellar bone of the osteons (phase 1).

implicit_phases() → list[int][source]

The phases of the realization, each described by an implicit function (phase_level_set()), in increasing order: phase 1 and what surrounds it (the structures of more phases, or of others, say theirs).

phase_level_set(phase: int, shape=None, *, voxel_size=None, grid: Grid | None = None) → VoxelImage[source]

The implicit function of a phase (see Microstructure.phase_level_set()), the same along the axis of the osteons.

level_set(shape=None, *, voxel_size=None, grid: Grid | None = None) → VoxelImage[source]

The implicit function of the lamellar bone of the osteons (phase 1).

voxelize(shape=None, *, voxel_size=None, grid: Grid | None = None, supersampling=1)[source]

Phase image (uint8), or partial volume fractions of phase 1 (float32) when supersampling > 1 (supersampling**3 sub-samples per voxel).

summary() → dict[source]

Counts and sizes describing the realization.

class morphogen.models.osteons.Osteons(radius: Distribution = 1.0, coverage: float = 0.7, canal_ratio: float = 0.2, cement_thickness: float = 0.03, axis: int = 2)[source]

Bases: Model

Haversian bone: aligned osteons with canals and cement lines, remodelled one after another over a fraction coverage of the cross-section (a dead-leaves model of cylinders along axis).

phases: ClassVar[dict[int, str]] = {0: 'interstitial bone', 1: 'osteons (lamellar bone)', 2: 'cement lines', 3: 'Haversian canals'}

Meaning of the phase indices of the voxel images.

has_level_set: ClassVar[bool] = False

Whether one level set, that of the phase 1, describes the realizations (two phases: the extended finite elements, the contours of the sections). False for the models of more phases, or of other phases than 0 and 1 (cells of a tessellation, coated inclusions, osteons…): each of their phases has its implicit function (Microstructure.phase_level_set()), from which they are meshed conformingly.

count_label: ClassVar[str] = 'osteons'

Objects counted by expected_count() (fibres, spheres, cells…).

property intensity: float

Osteons per unit area of the cross-section.

generate(domain: Domain, seed: int | SeedSequence | Generator | None = None) → OsteonStructure[source]

One realization of the model in domain.

expected_count(domain: Domain) → float[source]

Mean number of osteons across the domain (cut ones included).

theory(domain: Domain | None = None) → dict[str, float][source]

Theoretical morphological characteristics known in closed form (may be empty).

Some values depend on the domain (e.g. the intensity implied by a number of cells).