Skip to content

Use GEFF track_node_props metadata for tracklet/lineage key round-tripping #228

Description

@cmalinmayor

Problem

When exporting to GEFF via export_to_geff, funtracks does not set track_node_props in the GEFF metadata. When importing from GEFF via import_from_geff, funtracks does not read track_node_props to determine which node property stores tracklet/lineage IDs.

This means:

  1. Export: The GEFF file has no metadata indicating which property is the tracklet/lineage ID, even though the data is present as a node property.
  2. Import: If a GEFF file has a non-standard tracklet key (e.g., older files with "track_id" instead of "tracklet_id"), the fuzzy name inference can mismatch it (e.g., "track_id" gets mapped to "seg_id"), causing tracklet IDs to be silently recomputed.

Proposed Changes

Export (geff/_export.py)

  • Set track_node_props on the GeffMetadata using tracks.features.tracklet_key and tracks.features.lineage_key.

Import (geff/_import.py)

  • In GeffTracksBuilder.read_header() or infer_node_name_map(), read metadata.track_node_props and use it to seed the name map for tracklet/lineage keys (e.g., {"tracklet_id": "track_id"}) before fuzzy matching runs.
  • Since track_node_props is optional in the GEFF spec, this should be a best-effort enhancement — fall back to existing fuzzy matching when absent.

Context

Discovered during review of the fix-tracklet-attr-forwarding branch. Currently accepted that old GEFFs with "track_id" will recompute tracklet IDs unless the user provides an explicit node_name_map. This issue would improve that experience by leveraging GEFF metadata when available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Future

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions