#!/usr/bin/env python # coding: utf-8 # # switch # The `switch` function allows you to visualize multiple channels and blending them in and out. # In[1]: from skimage import data from skimage.filters import gaussian from skimage.measure import label import stackview # In[2]: nuclei = data.cells3d()[:,1] # In[3]: blurred = gaussian(nuclei, sigma=2) # In[4]: binary = blurred > 0.15 # In[5]: labels = label(binary) # In[6]: stackview.switch([nuclei, blurred, binary, labels], toggleable=True) # In[ ]: