Skip to content

funtracks.import_export.export_to_geff

Deprecated: Import from funtracks.import_export instead.

This module is deprecated and will be removed in funtracks v2.0. Use: from funtracks.import_export import export_to_geff

.. deprecated:: 1.0 This module location is deprecated. Import from the main package instead: from funtracks.import_export import export_to_geff

export_to_geff

export_to_geff(
    tracks: Tracks,
    directory: Path,
    overwrite: bool = False,
    node_ids: set[int] | None = None,
    zarr_format: Literal[2, 3] = 2,
    save_segmentation: bool = True,
    seg_relabel: Literal[
        "tracklet", "lineage", None
    ] = "tracklet",
    seg_file_format: Literal["zarr", "tiff"] = "zarr",
)

Export the Tracks graph to geff.

Only the solution graph is exported; soft-deleted (solution=False) candidates are not included.

Parameters:

Name Type Description Default
tracks Tracks

Tracks object containing a graph to save.

required
directory Path

Destination directory for saving the Zarr.

required
overwrite bool

If True, allows writing into a non-empty directory.

False
node_ids set[int]

A set of nodes that should be saved. If provided, a valid graph will be constructed that also includes the ancestors of the given nodes. All other nodes will NOT be saved.

None
zarr_format Literal[2, 3]

Zarr format version to use. Defaults to 2 for maximum compatibility.

2
save_segmentation bool

If True, saves the segmentation array alongside the graph when segmentation is present. Defaults to True.

True
seg_relabel Literal['tracklet', 'lineage', None]

How to relabel cells in the exported segmentation. "tracklet" (default): paint by tracklet ID. "lineage": paint by lineage ID. None: preserve original labels (node IDs).

'tracklet'
seg_file_format Literal['zarr', 'tiff']

Output format for the segmentation, either "zarr" or "tiff". Defaults to "zarr".

'zarr'