Skip to content

Whole Slide Image (WSI) Processing Library for Histopathological / Cytopathological Machine Learning Tasks

License

Notifications You must be signed in to change notification settings

tand826/wsiprocess

Repository files navigation

DOI Downloads PyPI conda

Convert Helper for Histopathological / Cytopathological Machine Learning Tasks

Main Flow

  1. Scan some WSIs.
  2. Make some annotations with WSI annotation tools. (ASAP and SlideRunner v.1.31.0, QuPath v0.2.3 are now available. See wiki for details.)
  3. Then wsiprocess helps converting WSI + Annotation data into patches and easy-to-use annotation data.

WSIPatcher will give you GUI.

See Wiki for

  1. available applications for annotation,
  2. speed comparison between patched images and loading from raw WSIs,
  3. how to use the other annotatiion files.

Installation

pip User

  1. Install openslide or libvips. See [wiki] for installation hints.

  2. Install wsiprocess

    pip install wsiprocess
    

Anaconda User

# Only for python 3.6 or higher
conda install -c tand826 wsiprocess

Documentation

Example

As a python module

As a command line tool

Available annotation tools

details: wiki

Available WSIs

Test ongoing
  • From below we tested wsi data.

    • 😄 => worked well.
    • ☔ => did not work well.
    • otherwise => did not check
  • Aperio

    • CMU-1-JP2K-33005.svs
    • 😄 CMU-1-Small-Region.svs
    • 😄 CMU-1.svs
    • CMU-2.svs
    • CMU-3.svs
    • JP2K-33003-1.svs
    • JP2K-33003-2.svs
  • Generic-TIFF

    • ☔CMU-1.tiff
      • Can not set magnification.
  • Hamamatsu-vms

  • Hamamatsu

    • 😄CMU-1.ndpi
    • CMU-2.ndpi
    • CMU-3.ndpi
    • OS-1.ndpi
    • OS-2.ndpi
    • OS-3.ndpi
  • Leica

    • 😄Leica-1.scn
    • Leica-2.scn
    • Leica-3.scn
    • Leica-Fluorescence-1.scn
  • Mirax

    • CMU-1-Exported.zip
    • CMU-1-Saved-1_16.zip
    • CMU-1-Saved-1_2.zip
    • ☔CMU-1.zip
      • Can not make the foreground mask.
    • CMU-2.zip
    • CMU-3.zip
    • Mirax2-Fluorescence-1.zip
    • Mirax2-Fluorescence-2.zip
    • Mirax2.2-1.zip
    • Mirax2.2-2.zip
    • Mirax2.2-3.zip
    • Mirax2.2-4-BMP.zip
    • Mirax2.2-4-PNG.zip
  • Olympus

    • OS-1.zip
    • OS-2.zip
    • OS-3.zip
  • Trestle

    • ☔CMU-1.zip
      • ASAP can not show the image properly, and it's hard to annotate.
    • CMU-2.zip
    • CMU-3.zip
  • Ventana

    • OS-1.bif
    • OS-2.bif
  • ☔Zeiss : Can not load slide - ☔Zeiss-1-Merged.zvi - ☔Zeiss-1-Stacked.zvi - ☔Zeiss-2-Merged.zvi - ☔Zeiss-2-Stacked.zvi - ☔Zeiss-3-Mosaic.zvi - ☔Zeiss-4-Mosaic.zvi

Test

Download sample WSI

curl -O -C - https://data.cytomine.coop/open/openslide/hamamatsu-ndpi/CMU-1.ndpi

Make random annotation

Run test.py

cd tests
pytest tests.py

Citation

@software{takumi_ando_2022_5938308,
  author       = {Takumi Ando},
  title        = {tand826/wsiprocess: version 0.9},
  month        = feb,
  year         = 2022,
  publisher    = {Zenodo},
  version      = {v0.9},
  doi          = {10.5281/zenodo.5938308},
  url          = {https://doi.org/10.5281/zenodo.5938308}
}

About

Whole Slide Image (WSI) Processing Library for Histopathological / Cytopathological Machine Learning Tasks

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages