traccuracy.loaders._geff
Module Contents
Functions
|
Load a graph into memory from a geff file |
- traccuracy.loaders._geff.load_geff_data(geff_path: str, load_geff_seg: bool = False, seg_path: str | None = None, seg_property: str | None = None, name: str | None = None, load_all_props: bool = False, border_margin: float | None = None) traccuracy._tracking_graph.TrackingGraph[source]
Load a graph into memory from a geff file
Segmentations can be optionally loaded either from a related object specified in the geff (
load_geff_seg=True) or with a path to a zarr arrayseg_pathandseg_property. If loading graphs with flags, e.g. for visualization, passload_all_props=True.- Parameters:
geff_path (str) – Path to a geff group inside of a zarr,
load_geff_seg (bool, optional) – Load segmentation based on a geff metadata of related segmentation. Defaults to False.
seg_path (str | None, optional) – Path to a zarr array containing segmentation data. We assume that the axes order in your segmentation array matches the axes in your geff. If this is not true please load the segmentation yourself and add it to TrackingGraph.segmentation. Defaults to None.
seg_property (str | None, optional) – If seg_path provided, this is the corresponding property on the geff graph that contains the segmentation key. Defaults to None.
name (str | None, optional) – Optional name to store on TrackingGraph for identification. Defaults to None.
load_all_props (bool, optional) – If True, load all node and edge properties on the graph. Defaults to False and only spatiotemporal and segmentation node properties are loaded. Set to True to get already annotated error flags, e.g. for visualization.
border_margin (float, optional) – If set, nodes whose centroid is within this distance (in pixels) of the spatial border will be excluded from the graph. Requires segmentation to be loaded. Defaults to None (no filtering).