Cropping images in Napari

less than 1 minute read

If you haven’t installed Napari, please do so before proceeding with this tutorial. If you just want to practice this tutorial, install the following minimal installation:

conda create -n napari_bioimage_analysis -y python=3.9 mamba
conda activate napari_bioimage_analysis
mamba install -y napari napari-crop

Cropping images in Napari

We can crop images in 2D using the Napari Crop plugin. To do so, create a new shape layer and draw a rectangle or any other closed shape around the desired region of interest. Then, select crop region from the Plugins menu to open the crop widgest. Specify the according image and shape layer and hit “run”. The cropped image will be displayed added as new layer in the layer list:

png Cropping in Napari.

Exercise

Reproduce the cropping shown in the animation above. I.e., load the “Cells (3D+2Ch)” sample image (or any other sample image of your choice), project the nuclei layer to 2D, and select some regions of interest, crop them, and save the cropped layers as new TIFF file.

Further readings

updated:

No other articles are linked to this site