Slide viewer
The slide viewer on the slide detail page provides pan/zoom navigation over tiled whole-slide and region images with analysis overlay layers.
Prerequisites
Run Generate tiles first. Without a tile manifest, the viewer shows a placeholder with a tile-generation button.
Navigation
- Pan — click and drag
- Zoom — scroll wheel or pinch
- Tiles load on demand from
GET /pathology/slides/{id}/tiles/{level}/{x}_{y}.jpg
A thumbnail preview loads when the full pyramid is not yet available.
Overlay layers
Toggle layers when corresponding pipeline runs have completed:
| Layer | Source pipeline | What it shows |
|---|---|---|
| Tissue mask | tissue_detect | Foreground tissue boundary |
| Cell overlay | segment_cells | Detected nucleus/cell boundaries |
| Density heatmap | spatial_quantification | Local cell density visualization |
| Annotations | Imported GeoJSON / QuPath | Labeled region boundaries |
Overlays are semi-transparent PNG artifacts composited over the base tile layer.
Cell inspection
When segmentation completes, detected cells appear in the Detected Cells table below the viewer:
- Centroid coordinates
- Area in pixels
- Class label and confidence score
Click cells in the table to highlight them in the viewer when supported.
Region context
Tissue detection produces region bounding boxes (tumor, stroma, etc. depending on detection output). Regions feed the Region Metrics table after spatial quantification.
QC signals
Review alongside the viewer:
- Tissue fraction — proportion of slide area classified as tissue
- Focus score — blur/focus quality indicator
- Focus warnings — tile-level QC flags
- Cell count and median confidence — segmentation quality summary
Export
After spatial quantification, export links provide:
- Cell spatial CSV — per-cell measurements
- Region metrics JSON — compartment-level statistics
Links appear in the Spatial Metrics panel on the slide detail page.
Performance notes
Large WSI pyramids generate many tiles. Local development works best with region images (640×480 to 5000×5000 px) before scaling to full scanner exports.