:orphan: :py:mod:`traccuracy.matchers._point_seg` ======================================== .. py:module:: traccuracy.matchers._point_seg Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: traccuracy.matchers._point_seg.PointSegMatcher Functions ~~~~~~~~~ .. autoapisummary:: traccuracy.matchers._point_seg.match_point_to_seg .. py:class:: PointSegMatcher 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. .. py:property:: info :type: dict[str, Any] Dictionary of Matcher name and any parameters .. py:method:: 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 :param gt_graph: Tracking graph object for the gt :type gt_graph: traccuracy.TrackingGraph :param pred_graph: Tracking graph object for the pred :type pred_graph: traccuracy.TrackingGraph :returns: Matched data object :rtype: matched (traccuracy.matchers.Matched) :raises ValueError: gt and pred must be a TrackingGraph object .. py:function:: 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] For a single timepoint, identify the segmentation ids which a set of points index into :param node_ids: A list of node ids :type node_ids: list[Hashable] :param locs: A list of locations corresponding to the list of node ids :type locs: list[list[float]] :param seg: A 2D segmentation array :type seg: np.ndarray :returns: A dictionary mapping from node_id to segmentation value :rtype: dict[Hashable, int]