Exports
Any segmentation of a dataset exports for other tools, into one folder: SpatialData and AnnData Zarr, Parquet and CSV, Matrix Market, GeoJSON, or Xenium Ranger's inputs with the command. Every file is listed by its SHA-256.
The formats


Export a segmentation writes any of a dataset's segmentations for other tools, into one folder you name:
| Format | For | Holds |
|---|---|---|
| SpatialData Zarr | spatialdata, napari-spatialdata | The cells as a label image and as polygons, the transcripts as points with their cells, the counts as an AnnData table |
| AnnData Zarr | scanpy, anndata | The counts, with each cell's measures and centroid |
| Parquet; CSV | DuckDB, pandas, R, polars | Cells, transcripts with their cells, outlines and counts, in Xenium's column names |
| Matrix Market | Seurat (Read10X), scanpy | The counts as Xenium and Cell Ranger write them |
| GeoJSON | QuPath, GIS tools | Each cell's outline as a polygon naming it |
| Xenium Ranger inputs | Xenium Ranger's import-segmentation | The cells and nuclei as label masks on the morphology image's pixels, and the command |
What an export keeps
Coordinates are in µm. Beside the files, situcraft-export.json says what was exported, from what and by which SituCraft, lists every file by its SHA-256, and gives fingerprints of the label image, the counts and the transcripts' cells that every format holds the same (Formats), so that you can check any reader got it exactly. The export runs as a job, is written under a temporary name and renamed into place when complete, and is recorded in the project. A folder that exists is replaced only when you ask, and only when it is an earlier SituCraft export.
For Xenium Ranger
For Xenium Ranger, SituCraft prepares the inputs and the command, and does not run it. It checks first that the masks are the morphology image's size, which cells have no pixel (Xenium Ranger cannot keep them), and how many transcripts this segmentation assigns otherwise than its mask holds at their pixel (Xenium Ranger assigns by the mask). Copy the command puts it on the clipboard to run where Xenium Ranger is installed.