movement.napari.layer_wiring#
Description
Layer callbacks that must outlive the widget connecting them.
Put a callback here if it should be active as long as the viewer or a layer exists (rather than sharing lifetime with a widget that can be closed).
Typical candidates are callbacks that mutate layer state (data, properties, symbols,
editable): that state is part of the user’s work and may be saved to a file later, so it must survive the widget being closed.A callback that only refreshes a widget’s own UI (a dropdown, a table, a button) can stay a method on that widget: once the widget is gone there is nothing left to update, which is fine.
Functions
Return the active movement Points layer, else the last one, else None. |
|
Wire the layer callbacks to a viewer, skipping if already wired. |
|
Determine whether the frame axis is the sliced axis in a 2D view. |
|
Return |
|
Keep the corresponding Tracks layer in sync with the Points layer. |
|
Remove the rows corresponding to deleted points. |
|
Show points flagged as edited with a distinct marker symbol. |
|
Set a Tracks layer's data and properties, preserving color_by. |
|
Update the corresponding Tracks layer to match an edited point. |
|
Widen the frame slider range to cover NaN-trimmed frames. |
|
Disable point editing while the frame axis isn't sliced. |