itasc.contact_analysis.shape.relational

Compute the relational nucleus-vs-cell shape table.

One row per (frame, cell_id) present in both the cell and nucleus label stacks. Because cells are nucleus-seeded, a nucleus carries the same label id as its cell, so pairing is a direct (frame, id) inner join — no geometry. Ids present in only one source are dropped from the join.

The emitted columns are relational quantities — ratios and offsets between the paired nucleus and cell — listed in RELATIONAL_COLUMNS. The table is computed in memory (compute_relational_table()) and pooled by the aggregate stage; nothing is persisted per position. Backend-only (no Qt / napari).

Module attributes

RELATIONAL_COLUMNS

The measured relational columns (everything but the tidy keys) — the value axis a plot/export chooses from.

Functions

compute_relational_table(cell_labels_path, ...)

The relational per-(frame, id) table, computed in memory (no file written).

itasc.contact_analysis.shape.relational.RELATIONAL_COLUMNS = ('nc_area_ratio', 'centroid_offset_um', 'centroid_offset_norm', 'orientation_delta', 'nc_perimeter_ratio', 'nc_major_axis_ratio', 'cell_area_um2', 'nucleus_area_um2')

The measured relational columns (everything but the tidy keys) — the value axis a plot/export chooses from. Kept explicit so the on-disk order is stable.

itasc.contact_analysis.shape.relational.compute_relational_table(cell_labels_path, nucleus_labels_path, *, pixel_size_um)[source]

The relational per-(frame, id) table, computed in memory (no file written).

Return type:

dict[str, ndarray]

Parameters: