具有3个或更多空间维度的数据集

大多数SCISKIT-IMAGE功能与3D数据集兼容,即具有3个空间维度的图像(与2D多通道图像不同,2D多通道图像也是具有三个轴的阵列)。 skimage.data.cells3d() 返回细胞的3D荧光显微镜图像。返回的数据集是3D多通道图像,其尺寸在中提供 (z, c, y, x) 秩序。通道0含有细胞膜,通道1含有细胞核。

下面的示例显示了如何浏览此数据集。该3D图像可用于测试SCRICKIT-IMAGE的各种功能。

输出:

Downloading file 'data/cells3d.tif' from 'https://gitlab.com/scikit-image/data/-/raw/2cdc5ce89b334d28f06a58c9f0ca21aa6992a5ba/cells3d.tif' to '/root/.cache/scikit-image/main'.

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)

脚本的总运行时间: (0分59.864秒)

Gallery generated by Sphinx-Gallery