expand for full code
from skimage import data
from scipy import ndimage as ndi
import napari
blobs = data.binary_blobs(length=128, volume_fraction=0.1, n_dim=3)
labeled = ndi.label(blobs)[0]
viewer, image_layer = napari.imshow(blobs, name='blobs')
viewer.add_labels(labeled, name='blob ID')
viewer.dims.ndisplay = 3
viewer.camera.zoom = 3
viewer.camera.angles = (3, 38, 53)
if __name__ == '__main__':
napari.run()