Skip to content

Instantly share code, notes, and snippets.

View CorinnaBuerger's full-sized avatar
🐢

Corinna Bürger CorinnaBuerger

🐢
View GitHub Profile
@petebankhead
petebankhead / QuPath-Exporting annotations as labelled images.groovy
Created March 14, 2018 23:01
Script to export pixels & annotations for whole slide images, optionally with tiling.
/**
* Script to export pixels & annotations for whole slide images.
*
* The image can optionally be tiled during export, so that even large images can be exported at high resolution.
* (Note: In this case 'tiled' means as separate, non-overlapping images... not a single, tiled pyramidal image.)
*
* The downsample value and coordinates are encoded in each image file name.
*
* The annotations are exported as 8-bit labelled images.
* These labels depend upon annotation classifications; a text file giving the key is written for reference.