itasc.contact_analysis.contacts.build¶
Functions
|
Assign deterministic edge IDs, linking losing/gaining pairs through T1s. |
|
Build the canonical contact-analysis HDF5 file from label stacks. |
|
Staged-layout wrapper around |
|
Build the contact-analysis HDF5 only when it is missing (or |
Classes
|
|
|
- class itasc.contact_analysis.contacts.build.EdgeRecord(frame, pair, kind, edge_label, length, midpoint_y, midpoint_x, coordinates)[source]¶
Bases:
object- Parameters:
- class itasc.contact_analysis.contacts.build.T1Record(t1_event_id, frame, edge_id, losing_pair, gaining_pair, location_y, location_x)[source]¶
Bases:
object- Parameters:
- itasc.contact_analysis.contacts.build.build_contacts(*, cell_labels_path, output_path, nucleus_labels_path=None, source_path=None, edge_extraction_params=None, progress_cb=None)[source]¶
Build the canonical contact-analysis HDF5 file from label stacks.
Position-agnostic core: takes an explicit cell-label TIFF (2D+t) and an optional nucleus-label TIFF, writing the HDF5 to
output_path.source_pathis recorded as provenance only. Whennucleus_labels_pathis given thecell_id == nucleus_idinvariant is enforced; otherwise nucleus validation is skipped.
- itasc.contact_analysis.contacts.build.ensure_contacts(*, cell_labels_path, output_path, nucleus_labels_path=None, overwrite=False, edge_extraction_params=None, progress_cb=None)[source]¶
Build the contact-analysis HDF5 only when it is missing (or
overwrite).The
.h5is a pure derived artifact of the label inputs, so callers that only need it present (the visualizer, the batch runner) should go through this guard rather than rebuilding unconditionally. Returns(output_path, built)wherebuiltisFalsewhen an existing file was reused.
- itasc.contact_analysis.contacts.build.build_position_contacts(position_path, output_path, *, cell_tracked_labels_path=None, nucleus_tracked_labels_path=None, edge_extraction_params=None, progress_cb=None)[source]¶
Staged-layout wrapper around
build_contacts().Resolves the committed
<position>/cell_labels.tifand<position>/nucleus_labels.tiflabels (what finalize/”commit” writes to the position base folder) when explicit paths are not supplied, then delegates to the position-agnostic core. These are the downstream-stable inputs, not the pre-commit working3_cell/2_nucleustracked labels. Retained for the orchestrator and out-of-repo consumers that pass a position directory.