napari_track_edit.import_export.menus.scale_widget
Classes
Widget to specify the spatial scaling of the graph in relation to its segmentation |
Module Contents
- class napari_track_edit.import_export.menus.scale_widget.ScaleWidget
Bases:
qtpy.QtWidgets.QWidgetWidget to specify the spatial scaling of the graph in relation to its segmentation data.
- scale = None
- scale_layout
- update(metadata: dict | None = None, incl_z: bool = False) → None
Add widgets to the layout, prefilled from available information if possible
- Parameters:
metadata (dict) – geff metadata dictionary containing ‘axes’ key with scaling information.
incl_z (bool) – whether to include ‘z’ (provide this if metadata is not available)
- _scale_spin_box(value: float) → qtpy.QtWidgets.QDoubleSpinBox
Return a QDoubleSpinBox for scaling values
- get_scale() → list[float] | None
Return the scaling values in the spinboxes as a list of floats.
Returns 1 for the time dimension, and then the spatial scales based on whether the data is 3D (time, y, x) or 4D (time, z, y, x).
Returns None if the scale widget hasn’t been initialized (no segmentation).