itasc.tracking_ultrack.db_query¶
Read-only Ultrack database helpers for napari preview tooling.
Functions
|
|
|
|
|
Partition |
|
Return link annotation counts for the whole DB or one node's incident links. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Return sorted distinct frame indices present in the database. |
|
|
|
|
|
Return raw, un-collapsed per-link edges incident to |
|
Group the size- |
|
Distinct atom-union sizes ( |
|
|
|
|
|
Full-frame partition for one horizontal slider position: the candidates in |
|
Classes
|
|
|
|
|
|
|
- class itasc.tracking_ultrack.db_query.UltrackDbPreview(labels, status, probabilities, label_to_node_id, node_id_to_label, node_annotations)[source]¶
Bases:
object- Parameters:
- itasc.tracking_ultrack.db_query.query_frame_range(db_path)[source]¶
Return sorted distinct frame indices present in the database.
- class itasc.tracking_ultrack.db_query.NodeEdge(neighbor_id, weight, annotation, direction, neighbor_t, neighbor_prob, neighbor_annot, weight_is_null=False)[source]¶
Bases:
object- Parameters:
- class itasc.tracking_ultrack.db_query.NodeEdges(selected_id, selected_t, selected_prob, selected_annot, edges)[source]¶
Bases:
object- Parameters:
- itasc.tracking_ultrack.db_query.query_node_edges(db_path, node_id)[source]¶
Return raw, un-collapsed per-link edges incident to
node_id.Unlike
query_connected_nodes()(which multiplies weights when a neighbor pair shares multiple links), eachLinkDBrow becomes its ownNodeEdge, so per-edge weights stay legible. Pure read.
- itasc.tracking_ultrack.db_query.link_annotation_counts(db_path, selected_node_id=None)[source]¶
Return link annotation counts for the whole DB or one node’s incident links.
- itasc.tracking_ultrack.db_query.query_union_sizes(db_path, frame)[source]¶
Distinct atom-union sizes (
height= number of merged atoms) present inframe, sorted ascending. Drives the vertical “union size” slider: index 0 is the finest (1 atom = individual atoms), higher indices merge more atoms.
- itasc.tracking_ultrack.db_query.query_union_color_classes(db_path, frame, union_size)[source]¶
Group the size-
union_sizecandidates offrameinto color classes of mutually non-overlapping candidates (a greedy graph coloring of the shared-atom overlap graph fromOverlapDB).Each returned class is a tuple of node ids that can be painted together in one full-frame partition without conflict, so every candidate of this size is shown in exactly one class while keeping the number of classes (= horizontal slider positions) small. Returns
()if no candidates of this size exist.
- itasc.tracking_ultrack.db_query.greedy_color_classes(node_ids, edges)[source]¶
Partition
node_idsinto classes with no intra-class edge (greedy graph coloring). Welsh–Powell order (highest degree first) keeps the class count low; ids preserve their original order within each class. Pure helper, no DB.
- itasc.tracking_ultrack.db_query.render_union_partition(db_path, frame, color_node_ids, *, plane_shape, union_size=None)[source]¶
Full-frame partition for one horizontal slider position: the candidates in
color_node_idspainted as merged regions, with the leftover territory filled by the largest available unions (size ≤union_size) so regions outside this merge group still show at their most-merged state instead of as raw atoms.union_sizecaps how merged the leftover fill may be; whenNoneit is taken from the selected candidates (theirheight), defaulting to atoms only.
- itasc.tracking_ultrack.db_query.query_hierarchy_cut_states(db_path, frame, *, source_index=None)[source]¶
- itasc.tracking_ultrack.db_query.render_hierarchy_cut(db_path, frame, height, *, plane_shape)[source]¶
- itasc.tracking_ultrack.db_query.render_hierarchy_cut_state(db_path, frame, state, *, plane_shape)[source]¶
- Return type:
- Parameters:
- itasc.tracking_ultrack.db_query.finalize_hierarchy_nodes(nodes, frame, *, plane_shape, empty_msg, status_suffix)[source]¶