Skip to content

Instantly share code, notes, and snippets.

@bdunnette
Last active August 29, 2015 14:20
Show Gist options
  • Save bdunnette/205c9bb35d17b32c401b to your computer and use it in GitHub Desktop.
Save bdunnette/205c9bb35d17b32c401b to your computer and use it in GitHub Desktop.
Output SVS files in standard TIFF format
#Process SVS files
for s in *.svs
do
i="${s%.*}"
echo "Processing $s"
width=`vips im_header_int Xsize $s`
height=`vips im_header_int Ysize $s`
echo "$width px wide, $height px high"
# Export slide label as PNG
vips openslideload --associated label $s $i-label.png
time vips extract_band $s $i.tif[compression=deflate] 0 --n 3
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment