traccuracy.matchers._point_seg
Module Contents
Classes
A matcher that constructs a mapping from a set of points to a segmentation |
Functions
|
For a single timepoint, identify the segmentation ids which a set of points index into |
- class traccuracy.matchers._point_seg.PointSegMatcher[source]
A matcher that constructs a mapping from a set of points to a segmentation array by determining if a point falls within a segmentation label.
Either the predicted data or the ground truth can contain a segmentation array, but not both. The matcher will map many points to a single segmentation label.
- property info: dict[str, Any]
Dictionary of Matcher name and any parameters
- compute_mapping(gt_graph: traccuracy._tracking_graph.TrackingGraph, pred_graph: traccuracy._tracking_graph.TrackingGraph) traccuracy.matchers._matched.Matched
Run the matching on a given set of gt and pred TrackingGraph and returns a Matched object with a new copy of each TrackingGraph
- Parameters:
gt_graph (traccuracy.TrackingGraph) – Tracking graph object for the gt
pred_graph (traccuracy.TrackingGraph) – Tracking graph object for the pred
- Returns:
Matched data object
- Return type:
matched (traccuracy.matchers.Matched)
- Raises:
ValueError – gt and pred must be a TrackingGraph object
- traccuracy.matchers._point_seg.match_point_to_seg(node_ids: list[collections.abc.Hashable], locs: list[list[float] | numpy.ndarray | tuple[float]], seg: numpy.ndarray) dict[collections.abc.Hashable, int][source]
For a single timepoint, identify the segmentation ids which a set of points index into
- Parameters:
node_ids (list[Hashable]) – A list of node ids
locs (list[list[float]]) – A list of locations corresponding to the list of node ids
seg (np.ndarray) – A 2D segmentation array
- Returns:
A dictionary mapping from node_id to segmentation value
- Return type:
dict[Hashable, int]