funtracks.import_export.import_from_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 import_from_geff
.. deprecated:: 1.0
This module location is deprecated. Import from the main package instead:
from funtracks.import_export import import_from_geff
import_from_geff
import_from_geff(
directory: Path,
node_name_map: dict[str, str | list[str]] | None = None,
segmentation_path: Path | None = None,
scale: list[float] | None = None,
node_features: dict[str, bool] | None = None,
edge_features: dict[str, bool] | None = None,
extra_features: dict[str, bool] | None = None,
edge_name_map: dict[str, str | list[str]] | None = None,
edge_prop_filter: list[str] | None = None,
name_map: dict[str, str | list[str]] | None = None,
) -> SolutionTracks
Import tracks from GEFF format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
directory
|
Path
|
Path to GEFF zarr store |
required |
node_name_map
|
dict[str, str | list[str]] | None
|
Optional mapping from standard funtracks keys to GEFF property names: {standard_key: geff_property_name}. For example: {"time": "t", "pos": ["y", "x"], "seg_id": "label"} - Keys are standard funtracks attribute names (e.g., "time", "pos") - Values are property names from the GEFF store (e.g., "t", "label") - For multi-value features like position, use a list: {"pos": ["y", "x"]} If None, property names are auto-inferred using fuzzy matching. |
None
|
segmentation_path
|
Path | None
|
Optional path to segmentation data |
None
|
scale
|
list[float] | None
|
Optional spatial scale |
None
|
node_features
|
dict[str, bool] | None
|
Optional node features to enable/load |
None
|
edge_features
|
dict[str, bool] | None
|
Optional edge features to enable/load |
None
|
extra_features
|
dict[str, bool] | None
|
(Deprecated) Use node_features instead. Kept for backward compatibility. |
None
|
edge_name_map
|
dict[str, str | list[str]] | None
|
Optional mapping from standard funtracks keys to GEFF edge property names. Example: {"iou": "overlap"} |
None
|
edge_prop_filter
|
list[str] | None
|
(Deprecated) Use edge_name_map instead. Kept for backward compatibility. |
None
|
name_map
|
dict[str, str | list[str]] | None
|
Deprecated. Use node_name_map instead. |
None
|
Returns:
| Type | Description |
|---|---|
SolutionTracks
|
SolutionTracks object |
Raises:
| Type | Description |
|---|---|
ValueError
|
If both node_features and extra_features are provided |
import_graph_from_geff
import_graph_from_geff(
directory: Path,
node_name_map: dict[str, str | list[str]],
edge_name_map: dict[str, str | list[str]] | None = None,
) -> tuple[InMemoryGeff, list[str], int]
Load GEFF data and rename property keys to standard names.
All property keys are renamed before NetworkX graph construction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
directory
|
Path
|
Path to GEFF data directory or zarr store |
required |
node_name_map
|
dict[str, str | list[str]]
|
Mapping from standard funtracks keys to GEFF property names: {standard_key: geff_property_name}. For example: {"time": "t", "pos": ["y", "x"], "seg_id": "label"} - Keys are standard funtracks attribute names (e.g., "time", "pos") - Values are property names from the GEFF store (e.g., "t", "label") - For multi-value features like position, use a list: {"pos": ["y", "x"]} Required keys: "time", "pos" (with spatial coordinates) Optional: "seg_id", "tracklet_id", "lineage_id", custom features Only properties included here will be loaded. |
required |
edge_name_map
|
dict[str, str | list[str]] | None
|
Mapping from standard funtracks keys to GEFF edge property names. If None, all edge properties loaded with original names. If provided, only specified properties loaded and renamed. Example: {"iou": "overlap"} |
None
|
Returns:
| Type | Description |
|---|---|
InMemoryGeff
|
(in_memory_geff, position_attr, ndims) where in_memory_geff has |
list[str]
|
all properties renamed to standard keys |
Raises:
| Type | Description |
|---|---|
ValueError
|
If node_name_map contains None or duplicate values |