Pipelines
All pathology pipelines run in backend-analysis and are dispatched asynchronously. List live definitions and parameter schemas:
curl http://localhost:8001/pathology/pipelines
Ingestion and viewing
| Pipeline | Input | Outputs |
|---|---|---|
tile_slide | Uploaded slide image | Tile manifest, thumbnail, pyramid levels |
Key parameters: tile_size (default 256 px).
Tissue analysis
| Pipeline | Input | Outputs |
|---|---|---|
tissue_detect | Slide with storage path | Tissue mask PNG, region bounding boxes, focus QC summary |
segment_cells | Tiled slide | Cell overlay PNG, cells JSON, cell count, confidence summary |
Segmentation parameters: model (default threshold_baseline; Cellpose/StarDist planned).
Spatial quantification
| Pipeline | Input | Outputs |
|---|---|---|
spatial_quantification | Completed segmentation run | Density heatmap, nearest-neighbor stats, region metrics, infiltration phenotype, CSV/JSON exports |
Requires segment_cells to complete first.
Cohort (planned)
| Pipeline | Input | Outputs |
|---|---|---|
cohort_compare | Multiple slides with sample group labels | Group comparison of pathology biomarkers |
API endpoint exists; full UI workflow is in Phase 4 — see products/pathology/plan.md.
Job lifecycle
queued → running → complete | failed
Poll status: GET /pathology/jobs/{run_id}
Job dispatch endpoints:
POST /pathology/jobs/tile-slide
POST /pathology/jobs/tissue-detect
POST /pathology/jobs/segment-cells
POST /pathology/jobs/spatial-quantification
POST /pathology/jobs/cohort-compare
Versioning
Every run records pipeline_version from the analysis service configuration. Include run IDs and versions in methods sections for reproducibility.
Implementation sources
Tissue detection and baseline segmentation use scikit-image and OpenCV kernels. Future phases integrate Cellpose, StarDist, and HistomicsTK-style color deconvolution. See products/pathology/plan.md for the full implementation map.