Skip to Content
TissueLab Docs

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.

FormatBest for
Zarr storeEverything, including embeddings; large slides
CSVA per-cell or per-patch table for statistics in Python or R
GeoJSONPolygons 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.

DatasetShapeContent
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.

DatasetShapeContent
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.

DatasetShapeContent
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

DatasetShapeContent
masks/<tissue>/mask2DBoolean raster per tissue class; its scale and origin attributes map it to level 0

User-Annotations

DatasetShapeContent
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.

ExportColumns
CellsID,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 annotationsSource,Class_ID,Class_Name,Class_Color,Color_Int,Method,Annotator,Datetime,Image_Name,Vertices
  • Contours is a single field of x,y pairs separated by ;.
  • Files are named <slide>_Cell_<timestamp>.csv, <slide>_Patch_Classification_<timestamp>.csv and <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] }
  }
}

On this page