motile_plugin.data_views.views.layers.track_graph
Classes
Extended tracks layer that holds the track information and emits and responds |
Functions
|
Function to take a networkx graph with assigned track_ids and return the data needed to add to |
Module Contents
- motile_plugin.data_views.views.layers.track_graph.update_napari_tracks(tracks: motile_plugin.data_model.solution_tracks.SolutionTracks)
Function to take a networkx graph with assigned track_ids and return the data needed to add to a napari tracks layer.
- Args:
tracks (SolutionTracks): tracks that have track_ids and have a tree structure
- Returns:
- data: array (N, D+1)
Coordinates for N points in D+1 dimensions. ID,T,(Z),Y,X. The first axis is the integer ID of the track. D is either 3 or 4 for planar or volumetric timeseries respectively.
- graph: dict {int: list}
Graph representing associations between tracks. Dictionary defines the mapping between a track ID and the parents of the track. This can be one (the track has one parent, and the parent has >=1 child) in the case of track splitting, or more than one (the track has multiple parents, but only one child) in the case of track merging.
- class motile_plugin.data_views.views.layers.track_graph.TrackGraph(name: str, tracks_viewer: motile_plugin.data_views.views_coordinator.tracks_viewer.TracksViewer)
Bases:
napari.layers.Tracks
Extended tracks layer that holds the track information and emits and responds to dynamics visualization signals
- tracks_viewer
- tracks_layer_graph
- colormap = 'turbo'
- _refresh()
Refreshes the displayed tracks based on the graph in the current tracks_viewer.tracks
- update_track_visibility(visible: list[int] | str) None
Optionally show only the tracks of a current lineage