From 8e6c5798e484e346c9ea5e702dd9dc1d06fc9303 Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Sun, 26 Mar 2023 13:45:12 +0200 Subject: [PATCH 1/3] execute function in interact once the GUI is set up --- stackview/_interact.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stackview/_interact.py b/stackview/_interact.py index 61a9504..b3f8267 100644 --- a/stackview/_interact.py +++ b/stackview/_interact.py @@ -151,6 +151,8 @@ def worker_function(*otherargs, **kwargs): execution_blocked = False + inter.update() + output_widgets = [] output_widgets.append(inter) output_widgets.append(command_label) From 1a944fb38a9bf0119333ebfc9ada8b4c1c43496f Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Sun, 26 Mar 2023 13:50:31 +0200 Subject: [PATCH 2/3] continuous_update is now True per default --- stackview/_annotate.py | 2 +- stackview/_assist.py | 2 +- stackview/_crop.py | 2 +- stackview/_curtain.py | 2 +- stackview/_interact.py | 2 +- stackview/_orthogonal.py | 2 +- stackview/_picker.py | 2 +- stackview/_side_by_side.py | 2 +- stackview/_slice.py | 2 +- stackview/_slice_viewer.py | 2 +- stackview/_switch.py | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/stackview/_annotate.py b/stackview/_annotate.py index b8a4926..c45eec6 100644 --- a/stackview/_annotate.py +++ b/stackview/_annotate.py @@ -24,7 +24,7 @@ def annotate( slice_number: int = None, alpha: float = 0.5, axis: int = 0, - continuous_update: bool = False, + continuous_update: bool = True, slider_text: str = "Slice", zoom_factor: float = 1.0, zoom_spline_order: int = 0 diff --git a/stackview/_assist.py b/stackview/_assist.py index d50b5c1..37677e4 100644 --- a/stackview/_assist.py +++ b/stackview/_assist.py @@ -1,6 +1,6 @@ def assist(what: str = "", context:dict = None, - continuous_update: bool = False, + continuous_update: bool = True, zoom_factor: float = 1.0, zoom_spline_order: int = 0, ): diff --git a/stackview/_crop.py b/stackview/_crop.py index 5666f17..83ae9f0 100644 --- a/stackview/_crop.py +++ b/stackview/_crop.py @@ -3,7 +3,7 @@ def crop(image, slice_number: int = None, axis: int = 0, - continuous_update: bool = False, + continuous_update: bool = True, slider_text: str = "Slice", axis_names=None, zoom_factor: float = 1.0, diff --git a/stackview/_curtain.py b/stackview/_curtain.py index e712e52..35d7246 100644 --- a/stackview/_curtain.py +++ b/stackview/_curtain.py @@ -6,7 +6,7 @@ def curtain( axis: int = 0, display_width: int = None, display_height: int = None, - continuous_update: bool = False, + continuous_update: bool = True, alpha: float = 1, zoom_factor :float = 1.0, zoom_spline_order :int = 0 diff --git a/stackview/_interact.py b/stackview/_interact.py index b3f8267..6b848c9 100644 --- a/stackview/_interact.py +++ b/stackview/_interact.py @@ -3,7 +3,7 @@ def interact(func, image = None, *args, - continuous_update: bool = False, + continuous_update: bool = True, context:dict = None, zoom_factor:float = 1.0, zoom_spline_order:int = 0, diff --git a/stackview/_orthogonal.py b/stackview/_orthogonal.py index cdea29c..59f98b2 100644 --- a/stackview/_orthogonal.py +++ b/stackview/_orthogonal.py @@ -3,7 +3,7 @@ def orthogonal( image, display_width : int = None, display_height : int = None, - continuous_update:bool=False, + continuous_update:bool=True, zoom_factor:float = 1.0, zoom_spline_order:int = 0 ): diff --git a/stackview/_picker.py b/stackview/_picker.py index 45e127d..65c506c 100644 --- a/stackview/_picker.py +++ b/stackview/_picker.py @@ -4,7 +4,7 @@ def picker( slice_number: int = None, display_width: int = None, display_height: int = None, - continuous_update: bool = False, + continuous_update: bool = True, slider_text: str = "Slice", zoom_factor:float = 1.0, zoom_spline_order:int = 0 diff --git a/stackview/_side_by_side.py b/stackview/_side_by_side.py index ba12332..5581258 100644 --- a/stackview/_side_by_side.py +++ b/stackview/_side_by_side.py @@ -7,7 +7,7 @@ def side_by_side( axis: int = 0, display_width: int = None, display_height: int = None, - continuous_update: bool = False, + continuous_update: bool = True, slider_text: str = "Slice", zoom_factor:float = 1.0, zoom_spline_order:int = 0 diff --git a/stackview/_slice.py b/stackview/_slice.py index 230d7da..f95d4c2 100644 --- a/stackview/_slice.py +++ b/stackview/_slice.py @@ -4,7 +4,7 @@ def slice( axis : int = 0, display_width : int = None, display_height : int = None, - continuous_update:bool=False, + continuous_update:bool = True, slider_text:str="Slice", zoom_factor:float = 1.0, zoom_spline_order:int = 0 diff --git a/stackview/_slice_viewer.py b/stackview/_slice_viewer.py index fee861e..cd5c2bd 100644 --- a/stackview/_slice_viewer.py +++ b/stackview/_slice_viewer.py @@ -6,7 +6,7 @@ def __init__(self, axis: int = 0, display_width: int = None, display_height: int = None, - continuous_update: bool = False, + continuous_update: bool = True, slider_text: str = "Slice", zoom_factor:float = 1.0, zoom_spline_order:int = 0 diff --git a/stackview/_switch.py b/stackview/_switch.py index d4a454c..b3811ca 100644 --- a/stackview/_switch.py +++ b/stackview/_switch.py @@ -3,7 +3,7 @@ def switch(images, axis : int = 0, display_width : int = None, display_height : int = None, - continuous_update:bool=False, + continuous_update:bool = True, slider_text:str="Slice", zoom_factor:float = 1.0, zoom_spline_order:int = 0 From e2adb574c34bf425860a2de0b46b234687d5affc Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Sun, 26 Mar 2023 13:50:55 +0200 Subject: [PATCH 3/3] bump version --- setup.py | 2 +- stackview/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 5b8ce96..24db3ec 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="stackview", - version="0.5.2", + version="0.6.0", author="Robert Haase", author_email="robert.haase@tu-dresden.de", description="Interactive image stack viewing in jupyter notebooks", diff --git a/stackview/__init__.py b/stackview/__init__.py index c9d7243..9a78ef0 100644 --- a/stackview/__init__.py +++ b/stackview/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.5.2" +__version__ = "0.6.0" from ._static_view import jupyter_displayable_output, insight from ._utilities import merge_rgb