@@ -60,6 +60,7 @@ def gaussian_blur(layer: ImageData, sigma: float = 1.0, mode="nearest") -> Image
6060 if layer is not None:
6161 return skimage.filters.gaussian(layer, sigma=sigma, mode=mode)
6262
63+
6364# create a viewer and add some images
6465viewer = napari.Viewer()
6566viewer.add_image(skimage.data.astronaut().mean(-1), name="astronaut")
@@ -88,9 +89,7 @@ def gaussian_blur(layer: ImageData, sigma: float = 1.0, mode="nearest") -> Image
8889the blur radius, and a `mode` that determines how edges are handled.
8990
9091```python
91- def gaussian_blur(
92- layer: Image, sigma: float = 1, mode="nearest"
93- ) -> Image:
92+ def gaussian_blur(layer: Image, sigma: float = 1, mode="nearest") -> Image:
9493 return filters.gaussian(layer.data, sigma=sigma, mode=mode)
9594```
9695
@@ -124,9 +123,7 @@ def gaussian_blur(
124123 sigma={"widget_type": "FloatSlider", "max": 6},
125124 mode={"choices": ["reflect", "constant", "nearest", "mirror", "wrap"]},
126125)
127- def gaussian_blur(
128- layer: ImageData, sigma: float = 1.0, mode="nearest"
129- ) -> ImageData:
126+ def gaussian_blur(layer: ImageData, sigma: float = 1.0, mode="nearest") -> ImageData:
130127 # Apply a gaussian blur to ``layer``.
131128 if layer is not None:
132129 return skimage.filters.gaussian(layer, sigma=sigma, mode=mode)
@@ -152,8 +149,8 @@ def gaussian_blur(
152149the result of our decorated function anytime it is called.
153150
154151```python
155- def do_something_with_result(result):
156- ...
152+ def do_something_with_result(result): ...
153+
157154
158155gaussian_blur.called.connect(do_something_with_result)
159156```
0 commit comments