From 294ae4e11d36537548b487732ac09b3a1fb73818 Mon Sep 17 00:00:00 2001 From: Christian Tischer Date: Tue, 13 Jun 2023 10:23:07 +0200 Subject: [PATCH] Add learning opportunities --- _includes/filter_neighbourhood/filter_mean_skimage_napari.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_includes/filter_neighbourhood/filter_mean_skimage_napari.py b/_includes/filter_neighbourhood/filter_mean_skimage_napari.py index 9153f9c1..756866bc 100644 --- a/_includes/filter_neighbourhood/filter_mean_skimage_napari.py +++ b/_includes/filter_neighbourhood/filter_mean_skimage_napari.py @@ -17,11 +17,13 @@ # %% # Appreciate that one cannot segment the nuclei by a simple intensity threshold +# Activity: Explore different threshold values binary_image = image > 40 viewer.add_image(binary_image) # %% # Define a circular structural element with a radius of 1 pixel +# Activity: Explore different radii from skimage.morphology import disk radius = 1 disk_radius1 = disk(radius) @@ -51,4 +53,4 @@ # %% # Now the nuclei can be segmented binary_mean_disk_radius3 = mean_disk_radius3 > 32 -viewer.add_image(binary_mean_disk_radius3) \ No newline at end of file +viewer.add_image(binary_mean_disk_radius3)