diff --git a/setup.cfg b/setup.cfg index 089dab06..099f13c1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -48,7 +48,7 @@ python_requires = >=3.8 include_package_data = True install_requires = imageio>=2.10.1 - magicgui @ git+https://git@github.com/pyapp-kit/magicgui.git + magicgui>=0.7.3 matplotlib>=3.4 networkx>=2.7 numba>=0.53 diff --git a/src/skan/napari.yaml b/src/skan/napari.yaml index 858d2ef5..55e617d1 100644 --- a/src/skan/napari.yaml +++ b/src/skan/napari.yaml @@ -4,15 +4,15 @@ contributions: commands: - id: skan.skeletonize title: Make Skeleton - python_name: skan.napari_skan:get_skeleton + python_name: skan.napari_skan:labels_to_skeleton_shapes - id: skan.color_widget title: Color Widget python_name: skan.napari_skan:color_by_feature widgets: - command: skan.skeletonize - display_name: Skeleton Widg... + display_name: Skeleton Widget autogenerate: true - command: skan.color_widget - display_name: Color Skeleton Widg... + display_name: Color Skeleton Widget diff --git a/src/skan/napari_skan.py b/src/skan/napari_skan.py index dfa008fc..0714cf32 100644 --- a/src/skan/napari_skan.py +++ b/src/skan/napari_skan.py @@ -14,7 +14,7 @@ class SkeletonizeMethod(Enum): lee = "lee" -def get_skeleton( +def labels_to_skeleton_shapes( labels: "napari.layers.Labels", choice: SkeletonizeMethod ) -> "napari.types.LayerDataTuple": """Skeletonize a labels layer using given method and export as Shapes. @@ -50,7 +50,7 @@ def get_skeleton( return all_paths, layer_kwargs, 'shapes' -def populate_feature_choices(color_by_feature_widget): +def _populate_feature_choices(color_by_feature_widget): """Update feature names combobox when source layer is changed. This runs on widget initialization and on every change of Shapes layer @@ -85,7 +85,7 @@ def get_choices(features_combo): @magic_factory( - widget_init=populate_feature_choices, + widget_init=_populate_feature_choices, feature_name={"widget_type": "ComboBox"} ) def color_by_feature(shapes_layer: "napari.layers.Shapes", feature_name):