Skip to content

slideExtract

Sander W. van der Laan edited this page Jan 8, 2024 · 3 revisions

slideExtract iterates through each input file, extracts thumbnails and macro-images at specified levels, and saves them to the output directory. It uses OpenSlide for reading slide images and OpenCV for image processing.

Example usage:

python slideExtract.py --input AE1234.SR.ndpi --levels m,6

Argument(s):

  • -i, --input
    • Input (directory containing files). Try: IMG012.ndpi (or *.TIF or /path_to/images/*.ndpi). Required.
  • -l, --levels
    • Comma separated list of magnification levels to extract, with m as thumbnail and 6 as level 6. Try: m,6. Required.

Optional argument(s):

  • -o, --outdir
    • Output dir, default is present working directory. Optional.
  • -s, --suffix
    • Suffix to append to end of file, default is m for thumbnail and # for a given level. Optional.
  • -t, --type
    • Output file type, default is png (which is slower), other options are tif. Optional.
  • -f, --force
    • Force output even if it exists. Optional.
  • -v, --verbose
    • While writing images also display image properties. Optional.
  • -h, --help
    • Show this help message and exit. Optional.
Clone this wiki locally