Convert Helper for Histopathological / Cytopathological Machine Learning Tasks
Main Flow
- Scan some WSIs.
- 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.)
- Then wsiprocess helps converting WSI + Annotation data into patches and easy-to-use annotation data.
WSIPatcher will give you GUI.
See Wiki for
- available applications for annotation,
- speed comparison between patched images and loading from raw WSIs,
- how to use the other annotatiion files.
Installation
pip User
-
Install openslide or libvips. See [wiki] for installation hints.
-
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
- see examples
- see wsiprocess/cli.py to check the detailed flow.
As a command line tool
- see examples.
Available annotation tools
- ASAP
- SlideRunner version 1.31.0
- QuPath v0.2.3
- NDP.View2
- and your favorite tools with custom parser
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.
- ☔CMU-1.tiff
-
Hamamatsu-vms
- 😄CMU-1.zip
- CMU-2.zip
- CMU-3.zip
- Could not DOWNLOAD from http://openslide.cs.cmu.edu/download/openslide-testdata/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
- ☔CMU-1.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
- Install ASAP ( Linux / Windows ) - https://github.com/computationalpathologygroup/ASAP/releases
- Open CMU-1.ndpi and make some random annotation. - Save the annotation xml as "CMU-1.xml".
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}
}
Metadata
Release files for wsiprocess 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wsiprocess-1.1.1.tar.gz | 38.4 kB | Without provenance | Details for wsiprocess-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wsiprocess-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for wsiprocess-1.1.1-py3-none-any.whl |
Total release size: 86.7 kB
Release files / wsiprocess-1.1.1.tar.gz
| Download URL | wsiprocess-1.1.1.tar.gz |
|---|---|
| Size | 38.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8e450092e552e623589caeacf196da8f925796b8f7cde9ad2d6fcc6ce2d91c3
|
|
BLAKE2b-256 checksum How to use checksums |
e9d0795cf60e2a486ef7905702fb4ece5cea795d7343017cd1116f7287eade6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.8
|
Release files / wsiprocess-1.1.1-py3-none-any.whl
| Download URL | wsiprocess-1.1.1-py3-none-any.whl |
|---|---|
| Size | 48.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99cba6dc3ac52aadff43fd6f940c8bb363781a1027efedb60cc6789123c2d053
|
|
BLAKE2b-256 checksum How to use checksums |
328be3d1b4513b9d16fbf451c41ac06b27c64f486b2e7ef1ab40065dcfb36a9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.8
|
Security for wsiprocess 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.