Key Points

Imaging Software for microscopy


  • There are many software options for light microscopy images
  • Considerations when choosing a software for your analysis include functionality, cost, availability, and customisation.
  • Napari and Fiji/ImageJ are popular open-source options

Getting Started With Napari


  • Napari’s user interface is split into a few main sections including the canvas, layer list, layer controls…
  • Layers can be of different types e.g. Image, Point, Label
  • Different layer types have different layer controls
  • Lots of additional functionality for Napari are available through plugins extendng its capability.

What is an image?


  • Digital images are made of pixels
  • Digital images store these pixels as arrays of numbers
  • Light microscopy images are only an approximation of the real sample
  • Napari (and Python more widely) use NumPy arrays to store images - these have a shape and dtype
  • Most images are 8-bit or 16-bit unsigned integer
  • Images use a coordinate system with (0,0) at the top left, x increasing to the right, and y increasing down

Using Napari through Jupyter


  • You can interact with Napari both through the interface, it’s built-in console or through a Jupyter lab notebook
  • Napari represents all elements for viewing (Images, Points, etc) as layers

Image Segmentation: Basic Concepts


  • Connected component analysis (the label function) was used to assign each connected region of a mask a unique integer value. This produces an instance segmentation from a semantic segmentation.
  • Erosion and dilation filters were used to correct the instance segmentation. Erosion was used to separate individual nuclei. Dilation (or expansion) was used to return the nuclei to their (approximate) original size.
  • Partial nuclei at the image edges can be removed with the clear_border function.
  • The napari-skimage plugin can be used to interactively examine the nuclei shapes.

Segment Anything for Microscopy (μSAM)


  • Classical image analysis methods often fail on label‑free images with subtle contrast.
  • μSAM adapts Segment Anything Model (SAM) for microscopy and integrates it into napari, providing robust segmentation tools for biological images.
  • μSAM supports area and point prompts, plus full image automatic segmentation.
  • Initial embedding step can be slow, especially with larger models.