Datasets with 3 or more spatial dimensionsΒΆ

Most scikit-image functions are compatible with 3D datasets, i.e., images with 3 spatial dimensions (to be distinguished from 2D multichannel images, which are also arrays with three axes). skimage.data.cells3d() returns a 3D fluorescence microscopy image of cells. The returned dataset is a 3D multichannel image with dimensions provided in (z, c, y, x) order. Channel 0 contains cell membranes, while channel 1 contains nuclei.

The example below shows how to explore this dataset. This 3D image can be used to test the various functions of scikit-image.

Out:

<frozen importlib._bootstrap>:219: RuntimeWarning:

cupy._core._carray.CArray size changed, may indicate binary incompatibility. Expected 448 from C header, got 560 from PyObject

<frozen importlib._bootstrap>:219: RuntimeWarning:

cupy._core._carray.CIndexer size changed, may indicate binary incompatibility. Expected 440 from C header, got 552 from PyObject

Downloading file 'data/cells3d.tif' from 'https://gitlab.com/scikit-image/data/-/raw/master/cells3d.tif' to '/home/lee8rx/.cache/scikit-image/0.19.0'.

from skimage import data
import plotly
import plotly.express as px

img = data.cells3d()[20:]
fig = px.imshow(img, facet_col=1, animation_frame=0,
                binary_string=True, binary_format='jpg')
fig.layout.annotations[0]['text'] = 'Cell membranes'
fig.layout.annotations[1]['text'] = 'Nuclei'
plotly.io.show(fig)

Total running time of the script: ( 0 minutes 4.070 seconds)

Gallery generated by Sphinx-Gallery