-
Notifications
You must be signed in to change notification settings - Fork 0
Tab Annotations
srao edited this page Aug 17, 2026
·
3 revisions
Draw and manage labelled tissue annotation polygons on the Annotations layer, assign annotation types, customise colours per type, and import or export annotations as GeoJSON. This tab is in the "Tools" control panel group.

Annotations are drawn directly on the napari canvas, not through this tab's buttons:
- Select the "Annotations" Shapes layer in the napari layer list.
- Choose the polygon tool in the napari toolbar.
- Draw a polygon outline around a tissue region of interest.
- Press Enter to close each polygon.
| Control | Description |
|---|---|
| Annotation type: | Text field. Type the label to assign to selected shapes (for example, "bone", "adipocyte", or "vessel"). |
| Assign to selected shapes | Applies the entered type label to all shapes currently selected on the Annotations layer. |
| Annotation type table | Table with columns Type, Count, and Colour. Shows all annotation types with their shape counts. Click a cell in the Colour column to open a colour picker for that type. |
| Delete selected shapes | Removes the currently selected shapes from the layer. |
| Clear all annotations | Removes all shapes from the layer. Shows a confirmation dialog before proceeding. |
| Import GeoJSON... | Loads a GeoJSON FeatureCollection (polygon or multipolygon geometries with an annotation_type or name property) and appends the shapes to existing annotations. |
| Export GeoJSON... | Saves all current annotations as a GeoJSON FeatureCollection. |
- Select the "Annotations" Shapes layer in the napari layer list.
- Activate the polygon tool in the napari toolbar and draw outlines around regions of interest.
- Select one or more completed shapes.
- Type a label in the "Annotation type:" field and click "Assign to selected shapes".
- Repeat steps 2–4 for each distinct region type.
- Click a colour cell in the annotation type table to customise per-type colours.
- Click "Export GeoJSON..." to save annotations for sharing or downstream analysis.
- Annotations are persisted to
sdata_cached.zarrautomatically and restored on the next launch. - The annotation type table is introduced by the label "Annotation types (click colour to change):" — the colour swatch in each row is clickable.
- Importing a GeoJSON file appends shapes to existing annotations; it does not replace them. Merge conflicts must be resolved manually.
- Annotation types defined here are available to the Annot Nhood and Annot Dist analysis tabs.
Reference
Cells
Genes
Spatial
- ROI Analysis
- Ligand-Receptor
- Neighborhood Enrichment
- Co-occurrence
- Spatial Domains
- Annot Nhood
- Annot Distance
Images
Tools
Tutorials
- Getting Started
- Clustering and DEG
- H&E Registration
- ARMS Overlay
- ROI Analysis
- Annotations
- Recovering a Cache