Analyse a whole slide
analyze_slideAnalyzes whole-slide images in the background, sampling or covering tissue tiles to measure nuclei density, size, and variation, with optional cell typing; fetch results later.
Instructions
Analyse a whole-slide image in the background and wait up to wait_seconds for the result.
coverage "sample" (default) analyses up to max_tiles tiles spread over the tissue in a few minutes. "full" analyses every tissue tile (up to 3,000, about 200 mm2) in parallel parts and tints the overview as a density heatmap: a few minutes for a biopsy, longer for big resections. Cell types are on by default for a sample and off for full coverage (they take about 15x longer per tile); set cell_types to change that.
Finds the tissue, samples up to max_tiles tiles of it (256 x 256 um each at 40x) and runs the quality check and StarDist nuclei on each: nuclei per mm2, nuclear size in um2, size variation and enlarged nuclei across the slide, plus per-tile values. With cell_types (default) each nucleus is also typed as tumour, immune, connective tissue, dead or normal epithelial (HoVer-Net, PanNuke weights: research and education only), about 40 seconds a tile, so max_tiles defaults to 12 (16 without cell types). Allow a minute more when the models start. If it's still running when the wait ends, call get_slide_analysis later. An analysis already running is waited for; restart=true starts a new one (e.g. with more tiles).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| restart | No | Start a new analysis even if one already exists for this slide. | |
| coverage | No | 'sample': up to max_tiles tiles spread over the tissue, in minutes; 'full': every tissue tile in parallel, with a density heatmap. | sample |
| image_id | Yes | Id of a whole slide: the imageId (a UUID string) returned by upload_slide or upload_slide_from_url. | |
| max_tiles | No | Tiles to analyse for a sample (default 12 with cell types, 16 without). | |
| cell_types | No | Also type each nucleus (tumour, immune, connective tissue, dead, normal epithelial); default on for a sample, off for full coverage. | |
| wait_seconds | No | How long to wait for the result; if it isn't ready, get_slide_analysis reads it later. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||