Skip to content

Instantly share code, notes, and snippets.

View psobolewskiPhD's full-sized avatar

Peter Sobolewski psobolewskiPhD

View GitHub Profile
#%%
import matplotlib.pyplot as plt
from matplotlib.backends.backend_qt5agg import FigureCanvas
from skimage import measure
from skimage import io
import numpy as np
import os
import napari
#%%
import matplotlib.pyplot as plt
from matplotlib.backends.backend_qt5agg import FigureCanvas
from skimage import measure
import numpy as np
import napari
def profile_line(viewer):
def get_image_layer():
for layer in viewer.layers.selection:
@psobolewskiPhD
psobolewskiPhD / browse_LIF.py
Last active August 31, 2021 18:51
Widget to browse LIF scenes
#%%
from aicsimageio import AICSImage
import napari
import dask.array as da
import numpy as np
from vispy.color import Colormap
import os
from qtpy.QtWidgets import QListWidget
from qtpy.QtCore import Qt
# %%
import napari
from skimage import data
# %%
viewer = napari.Viewer()
image = viewer.add_image(data.astronaut(), rgb=True)
image.data.shape
# %%
viewer.camera.zoom = 2.5
@psobolewskiPhD
psobolewskiPhD / gist:635f70cc5a1814ddbf5988fd419d126e
Created November 30, 2021 09:16
scikit-image 0.20.0dev: python -c "import skimage; skimage.test()"
skimage version 0.20.0.dev0
==================================== ERRORS ====================================
_ ERROR collecting miniforge3/envs/test-scik/lib/python3.9/site-packages/skimage/feature/tests/test_basic_features.py _
ImportError while importing test module '/Users/piotrsobolewski/Dev/miniforge3/envs/test-scik/lib/python3.9/site-packages/skimage/feature/tests/test_basic_features.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
miniforge3/envs/test-scik/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
miniforge3/envs/test-scik/lib/python3.9/site-packages/skimage/feature/__init__.py:4: in <module>
@psobolewskiPhD
psobolewskiPhD / gist:a01f8e5692d3b812621eb7fd73b42e4d
Created November 30, 2021 15:42
scikit-image wheel with fixed openmp
================================ warnings summary ================================
miniforge3/envs/test-scik/lib/python3.9/importlib/__init__.py:127
/Users/piotrsobolewski/Dev/miniforge3/envs/test-scik/lib/python3.9/importlib/__init__.py:127: UserWarning: Viewer requires Qt
return _bootstrap._gcd_import(name[level:], package, level)
miniforge3/envs/test-scik/lib/python3.9/site-packages/skimage/filters/tests/test_ridges.py::test_3d_null_matrix
miniforge3/envs/test-scik/lib/python3.9/site-packages/skimage/filters/tests/test_ridges.py::test_3d_linearity
miniforge3/envs/test-scik/lib/python3.9/site-packages/skimage/filters/tests/test_ridges.py::test_3d_cropped_camera_image
/Users/piotrsobolewski/Dev/miniforge3/envs/test-scik/lib/python3.9/site-packages/skimage/_shared/utils.py:214: RuntimeWarning: Images with dimensions (M, N, 3) are interpreted as 2D+RGB by default. Use `multichannel=False` to interpret as 3D image with last dimension of length 3.
return func(*args, **kwargs)
@psobolewskiPhD
psobolewskiPhD / gist:7253e0ef964b13710814240744944e0c
Last active December 4, 2021 09:25
scikit-image 0.19.0 tests macOS 12 Apple M1
skimage version 0.19.0
==================================== ERRORS ====================================
_ ERROR collecting Dev/miniforge3/envs/test-scik/lib/python3.9/site-packages/skimage/feature/tests/test_basic_features.py _
ImportError while importing test module '/Users/piotrsobolewski/Dev/miniforge3/envs/test-scik/lib/python3.9/site-packages/skimage/feature/tests/test_basic_features.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
Dev/miniforge3/envs/test-scik/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
Dev/miniforge3/envs/test-scik/lib/python3.9/site-packages/skimage/feature/__init__.py:4: in <module>
@psobolewskiPhD
psobolewskiPhD / gist:38dcd662ad9a7e6e17ab8ee3db5f81a9
Created December 4, 2021 09:35
conda-forge scikit-image 0.18.3 macOS 12 Apple M1 tests
============================= test session starts ==============================
platform darwin -- Python 3.9.7, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /Users/piotrsobolewski
plugins: localserver-0.5.1
collected 6245 items / 3 skipped / 6242 selected
Dev/miniforge3/envs/test-scik/lib/python3.9/site-packages/skimage/_shared/tests/test_coord.py . [ 0%]
......................................... [ 0%]
Dev/miniforge3/envs/test-scik/lib/python3.9/site-packages/skimage/_shared/tests/test_fast_exp.py . [ 0%]
[ 0%]
@psobolewskiPhD
psobolewskiPhD / gist:cc1e43727cd316cc2cfdd6f06990e06d
Created December 5, 2021 17:47
Fresh scikit 0.19 why, python 3.9.7
=============================== warnings summary ===============================
Dev/miniforge3/envs/test-scik-9/lib/python3.9/importlib/__init__.py:127
/Users/piotrsobolewski/Dev/miniforge3/envs/test-scik-9/lib/python3.9/importlib/__init__.py:127: UserWarning: Viewer requires Qt
return _bootstrap._gcd_import(name[level:], package, level)
Dev/miniforge3/envs/test-scik-9/lib/python3.9/site-packages/skimage/filters/tests/test_ridges.py::test_3d_null_matrix
Dev/miniforge3/envs/test-scik-9/lib/python3.9/site-packages/skimage/filters/tests/test_ridges.py::test_3d_linearity
Dev/miniforge3/envs/test-scik-9/lib/python3.9/site-packages/skimage/filters/tests/test_ridges.py::test_3d_cropped_camera_image
/Users/piotrsobolewski/Dev/miniforge3/envs/test-scik-9/lib/python3.9/site-packages/skimage/_shared/utils.py:293: RuntimeWarning: Images with dimensions (M, N, 3) are interpreted as 2D+RGB by default. Use `multichannel=False` to interpret as 3D image with last dimension of length 3.
return func(*args, **kwarg
@psobolewskiPhD
psobolewskiPhD / gist:4f867c589218882276da93345f2836f9
Created December 5, 2021 17:55
fresh scikit-image 0.19 on python 3.10
=============================== warnings summary ===============================
Dev/miniforge3/envs/test-scik/lib/python3.10/importlib/__init__.py:126
/Users/piotrsobolewski/Dev/miniforge3/envs/test-scik/lib/python3.10/importlib/__init__.py:126: UserWarning: Viewer requires Qt
return _bootstrap._gcd_import(name[level:], package, level)
Dev/miniforge3/envs/test-scik/lib/python3.10/site-packages/skimage/filters/tests/test_ridges.py::test_3d_null_matrix
Dev/miniforge3/envs/test-scik/lib/python3.10/site-packages/skimage/filters/tests/test_ridges.py::test_3d_linearity
Dev/miniforge3/envs/test-scik/lib/python3.10/site-packages/skimage/filters/tests/test_ridges.py::test_3d_cropped_camera_image
/Users/piotrsobolewski/Dev/miniforge3/envs/test-scik/lib/python3.10/site-packages/skimage/_shared/utils.py:293: RuntimeWarning: Images with dimensions (M, N, 3) are interpreted as 2D+RGB by default. Use `multichannel=False` to interpret as 3D image with last dimension of length 3.
return func(*args, **kwargs)