Export Schema
Schema of analysis results: Zarr store, CSV and GeoJSON.
Results sit in a Zarr store next to the slide (see Supported Formats). Read it directly, or export CSV / GeoJSON.
| Format | Best for |
|---|---|
| Zarr store | Everything, including embeddings; large slides |
| CSV | A per-cell or per-patch table for statistics in Python or R |
| GeoJSON | Polygons with classes, for other viewers and annotation tools |
Zarr store
One group per kind of result. N is the number of cells or patches, M the number of classes; coordinates are level-0 pixels of the slide.
import zarr
store = zarr.open_group("case01.svs.zarr", mode="r")
cells = store["Cell-Segmentation"]
centroids = cells["centroids"][:] # (N, 2) -> x, y
embeddings = cells["embeddings"][:] # (N, D)
labels = store["Cell-Classification"]
class_idx = labels["class_indices"][:] # (N,), -1 = unclassified
class_names = [n.decode() for n in labels["classes/name"][:]]Cell-Segmentation
One row per detected cell.
| Dataset | Shape | Content |
|---|---|---|
centroids | (N, 2) | Cell center, [x, y] |
contours | (N, vertices, 2) | Cell outline, one polygon per cell |
embeddings | (N, D) | Feature vector per cell; D depends on the model (1536 for H-optimus-0) |
probabilities | (N,) | Per-cell score |
Cell-Classification
Rows line up with Cell-Segmentation.
| Dataset | Shape | Content |
|---|---|---|
class_indices | (N,) | Predicted class per cell; -1 = unclassified |
probabilities | (N, M) | Probability of each class per cell |
classes/index | (M,) | Class ids |
classes/name | (M,) | Class names (byte strings) |
classes/color | (M,) | Class hex colors (byte strings) |
Patch-Segmentation
One row per image patch.
| Dataset | Shape | Content |
|---|---|---|
coordinates | (N, 4) | Patch box, [x1, y1, x2, y2] |
embeddings | (N, D) | Feature vector per patch |
probabilities | (N, …) | Per-patch scores |
Patch-Classification
Rows line up with Patch-Segmentation; same datasets as Cell-Classification (class_indices, classes/index, classes/name, classes/color).
Tissue-Segmentation
| Dataset | Shape | Content |
|---|---|---|
masks/<tissue>/mask | 2D | Boolean raster per tissue class; its scale and origin attributes map it to level 0 |
User-Annotations
| Dataset | Shape | Content |
|---|---|---|
cell | (N,) | Your label per cell: class, color, datetime, method, annotator |
patch | (N,) | Your label per patch, same fields |
CSV
Lines starting with # are comments.
| Export | Columns |
|---|---|
| Cells | ID,Centroid_X,Centroid_Y,MinX,MinY,MaxX,MaxY,Class_ID,Class_Name,Class_Color,Contours |
| Patches (ROI table) | ID,X1,Y1,X2,Y2,Class_ID,Class_Name,Class_Color |
| User annotations | Source,Class_ID,Class_Name,Class_Color,Color_Int,Method,Annotator,Datetime,Image_Name,Vertices |
Contoursis a single field ofx,ypairs separated by;.- Files are named
<slide>_Cell_<timestamp>.csv,<slide>_Patch_Classification_<timestamp>.csvand<slide>_User_Annotations_<timestamp>.csv.
import pandas as pd
cells = pd.read_csv("case01_Cell_20260101_120000.csv", comment="#")
counts = cells.groupby("Class_Name").size()cells <- read.csv("case01_Cell_20260101_120000.csv", comment.char = "#")
table(cells$Class_Name)GeoJSON
One Feature per cell, patch or annotation; cell class names carry a TL_ prefix.
{
"type": "Feature",
"id": "0",
"geometry": { "type": "Polygon", "coordinates": [[[1024.0, 2048.0], [1030.5, 2051.0], [1027.0, 2060.5], [1024.0, 2048.0]]] },
"properties": {
"objectType": "annotation",
"classification": { "name": "TL_Tumor", "color": [255, 0, 0] }
}
}