napari_track_edit.import_export.menus.prop_map_widget
Attributes
Classes
QWidget to map motile run attributes to node properties in csv or geff. |
Functions
|
Determine the data type for a property stored under |
|
Extract the data type of a pandas series as one of 'bool', 'int', 'float', 'str', |
Module Contents
- napari_track_edit.import_export.menus.prop_map_widget.FIELD_ALIASES
- napari_track_edit.import_export.menus.prop_map_widget.RESERVED_PROPS
- napari_track_edit.import_export.menus.prop_map_widget.get_attr_dtype_zarr(root: zarr.Group, attr: str) → str
Determine the data type for a property stored under root[‘nodes’][‘props’][attr].
- Returns:
‘bool’, ‘int’, ‘float’, ‘str’, or ‘object’
- Return type:
One of
- napari_track_edit.import_export.menus.prop_map_widget.get_attr_dtype_pandas(series: pandas.Series) → str
Extract the data type of a pandas series as one of ‘bool’, ‘int’, ‘float’, ‘str’, or ‘object’
- class napari_track_edit.import_export.menus.prop_map_widget.StandardFieldMapWidget
Bases:
qtpy.QtWidgets.QWidgetQWidget to map motile run attributes to node properties in csv or geff.
- props_updated
- seg = False
- seg_for_features = False
- incl_z = True
- has_duplicates = False
- node_attrs: list[str] = []
- metadata = None
- mapping_labels
- mapping_widgets
- mapping_layout
- optional_mapping_layout
- optional_features
- extract_csv_property_fields(df: pandas.DataFrame, seg: bool, incl_z: bool) → None
Update the mapping widget with the provided root group and segmentation flag.
- extract_geff_property_fields(root: zarr.Group, seg: bool, incl_z: bool, seg_for_features: bool | None = None) → None
Update the mapping widget with the provided root group and segmentation flag.
- _update_props_left() → None
Update the list of columns that have not been mapped yet
Remove attributes from optional features if they are mapped in the mandatory mapping.
- _get_initial_mapping() → dict[str, str]
Make an initial guess for mapping of geff columns to fields
- _add_optional_prop(attribute: str) → None
Add an attribute to the dictionary of optional features and create the associated widgets in the grid layout: - Checkbox to include/exclude the attribute - Combobox to select the feature option (regionprops feature, ‘Group’, or ‘Custom’) - Checkbox to indicate whether to recompute the feature (only for regionprops features)
- Parameters:
attribute (str) – The attribute name to add as an optional feature
- _remove_optional_prop(attribute: str) → None
Remove an attribute from the dictionary of optional features and remove the associated widgets from the ‘extra features’ layout.
- _check_for_duplicates() → None
Check if any regionprops property is assigned twice in optional_features (ignoring ‘Group’ and ‘Custom’).
- _wrap_tooltip(text: str) → str
Wrap tooltip with fixed width.
- _get_tooltip(attribute: str) → str
Return the tooltip for the given attribute
- update_mapping(seg: bool = False) → None
Map graph spatiotemporal data and optionally the track and lineage attributes.
- Parameters:
seg (bool) – whether a segmentation is associated with this data
- get_name_map() → dict[str, str]
Return a mapping from standard field name to source property name.
Includes standard fields (time, x, y, etc.), Custom/Group features, and non-recompute regionprops features selected in optional features.
- get_recompute_keys() → list[str]
Get feature keys that should be recomputed from segmentation.
Returns a list of default feature keys for which the user checked the ‘Recompute’ checkbox.