wsiprocess


Namewsiprocess JSON
Version 1.1.1 PyPI version JSON
download
home_pagehttps://github.com/tand826/wsiprocess
SummaryWhole Slide Image (WSI) Processing Library
upload_time2023-09-08 04:58:21
maintainer
docs_urlNone
authorTakumi Ando
requires_python>=3.6
licenseApache License 2.0
keywords histopathology cytopathology medical-imaging whole-slide-imaging machine-learning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
<img src="https://raw.githubusercontent.com/tand826/wsiprocess/main/images/wsiprocess.svg" style="width: 50%">

![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4629396.svg)
![Downloads](https://pepy.tech/badge/wsiprocess)
![PyPI](https://img.shields.io/pypi/v/wsiprocess)
![conda](https://anaconda.org/tand826/wsiprocess/badges/version.svg)

</div>

Convert Helper for Histopathological / Cytopathological Machine Learning Tasks

# Main Flow

<div align="center">
<img src="https://raw.githubusercontent.com/tand826/wsiprocess/main/images/description.gif" style="max-width: 80%">
</div>

1. Scan some WSIs.
2. Make some annotations with WSI annotation tools. ([ASAP](https://github.com/computationalpathologygroup/ASAP/releases) and [SlideRunner v.1.31.0](https://github.com/DeepPathology/SlideRunner), [QuPath v0.2.3](https://github.com/qupath/qupath) are now available. See [wiki](https://github.com/tand826/wsiprocess/wiki) for details.)
3. Then wsiprocess helps converting WSI + Annotation data into patches and easy-to-use annotation data.


[WSIPatcher](https://github.com/tand826/WSIPatcher) will give you GUI.

See [Wiki](https://github.com/tand826/wsiprocess/wiki) for 
1. [available applications for annotation](https://github.com/tand826/wsiprocess/wiki/annotation_applications), 
2. [speed comparison](https://github.com/tand826/wsiprocess/wiki/speed_comparison) between patched images and loading from raw WSIs,
3. [how to use the other annotatiion files](https://github.com/tand826/wsiprocess/wiki/How-to-use-custom-annotation-parser).

# Installation

### pip User

1. Install [openslide](https://openslide.org/) or [libvips](https://libvips.github.io/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

- [Documentation](https://tand826.github.io/wsiprocess/)

# Example

### As a python module

- see [examples](https://github.com/tand826/wsiprocess/tree/main/examples)
- see [wsiprocess/cli.py](https://github.com/tand826/wsiprocess/blob/main/wsiprocess/cli.py) to check the detailed flow.

### As a command line tool

- see [examples](https://github.com/tand826/wsiprocess/tree/main/examples).

# Available annotation tools

- [ASAP](https://github.com/computationalpathologygroup/ASAP/)
- [SlideRunner version 1.31.0](https://github.com/DeepPathology/SlideRunner)
- [QuPath v0.2.3](https://github.com/qupath/qupath)
- [NDP.View2](https://www.hamamatsu.com/jp/ja/product/life-science-and-medical-systems/digital-slide-scanner/U12388-01.html)
- and your favorite tools with [custom parser](https://github.com/tand826/wsiprocess/wiki/How-to-use-custom-annotation-parser)

details: [wiki](https://github.com/tand826/wsiprocess/wiki)

# Available WSIs

<details>
    <summary>Test ongoing</summary>
    <div>

- From below we tested wsi data.

  - :smile: => worked well.
  - :umbrella: => did not work well.
  - otherwise => did not check

- Aperio

  - CMU-1-JP2K-33005.svs
  - :smile: CMU-1-Small-Region.svs
  - :smile: CMU-1.svs
  - CMU-2.svs
  - CMU-3.svs
  - JP2K-33003-1.svs
  - JP2K-33003-2.svs

- Generic-TIFF

  - :umbrella:CMU-1.tiff
    - Can not set magnification.

- Hamamatsu-vms

  - :smile:CMU-1.zip
  - CMU-2.zip
  - CMU-3.zip
    - Could not DOWNLOAD from http://openslide.cs.cmu.edu/download/openslide-testdata/Hamamatsu-vms/

- Hamamatsu

  - :smile:CMU-1.ndpi
  - CMU-2.ndpi
  - CMU-3.ndpi
  - OS-1.ndpi
  - OS-2.ndpi
  - OS-3.ndpi

- Leica

  - :smile: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
  - :umbrella: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

  - :umbrella: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

- :umbrella:Zeiss : Can not load slide - :umbrella:Zeiss-1-Merged.zvi - :umbrella:Zeiss-1-Stacked.zvi - :umbrella:Zeiss-2-Merged.zvi - :umbrella:Zeiss-2-Stacked.zvi - :umbrella:Zeiss-3-Mosaic.zvi - :umbrella:Zeiss-4-Mosaic.zvi
</div>
</details>

# 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}
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tand826/wsiprocess",
    "name": "wsiprocess",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "histopathology,cytopathology,medical-imaging,whole-slide-imaging,machine-learning",
    "author": "Takumi Ando",
    "author_email": "takumi.ando826@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e9/d0/795cf60e2a486ef7905702fb4ece5cea795d7343017cd1116f7287eade6e/wsiprocess-1.1.1.tar.gz",
    "platform": "any",
    "description": "<div align=\"center\">\n<img src=\"https://raw.githubusercontent.com/tand826/wsiprocess/main/images/wsiprocess.svg\" style=\"width: 50%\">\n\n![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4629396.svg)\n![Downloads](https://pepy.tech/badge/wsiprocess)\n![PyPI](https://img.shields.io/pypi/v/wsiprocess)\n![conda](https://anaconda.org/tand826/wsiprocess/badges/version.svg)\n\n</div>\n\nConvert Helper for Histopathological / Cytopathological Machine Learning Tasks\n\n# Main Flow\n\n<div align=\"center\">\n<img src=\"https://raw.githubusercontent.com/tand826/wsiprocess/main/images/description.gif\" style=\"max-width: 80%\">\n</div>\n\n1. Scan some WSIs.\n2. Make some annotations with WSI annotation tools. ([ASAP](https://github.com/computationalpathologygroup/ASAP/releases) and [SlideRunner v.1.31.0](https://github.com/DeepPathology/SlideRunner), [QuPath v0.2.3](https://github.com/qupath/qupath) are now available. See [wiki](https://github.com/tand826/wsiprocess/wiki) for details.)\n3. Then wsiprocess helps converting WSI + Annotation data into patches and easy-to-use annotation data.\n\n\n[WSIPatcher](https://github.com/tand826/WSIPatcher) will give you GUI.\n\nSee [Wiki](https://github.com/tand826/wsiprocess/wiki) for \n1. [available applications for annotation](https://github.com/tand826/wsiprocess/wiki/annotation_applications), \n2. [speed comparison](https://github.com/tand826/wsiprocess/wiki/speed_comparison) between patched images and loading from raw WSIs,\n3. [how to use the other annotatiion files](https://github.com/tand826/wsiprocess/wiki/How-to-use-custom-annotation-parser).\n\n# Installation\n\n### pip User\n\n1. Install [openslide](https://openslide.org/) or [libvips](https://libvips.github.io/libvips/). See [wiki] for installation hints.\n\n2. Install wsiprocess\n\n   ```\n   pip install wsiprocess\n   ```\n\n### Anaconda User\n\n```\n# Only for python 3.6 or higher\nconda install -c tand826 wsiprocess\n```\n\n# Documentation\n\n- [Documentation](https://tand826.github.io/wsiprocess/)\n\n# Example\n\n### As a python module\n\n- see [examples](https://github.com/tand826/wsiprocess/tree/main/examples)\n- see [wsiprocess/cli.py](https://github.com/tand826/wsiprocess/blob/main/wsiprocess/cli.py) to check the detailed flow.\n\n### As a command line tool\n\n- see [examples](https://github.com/tand826/wsiprocess/tree/main/examples).\n\n# Available annotation tools\n\n- [ASAP](https://github.com/computationalpathologygroup/ASAP/)\n- [SlideRunner version 1.31.0](https://github.com/DeepPathology/SlideRunner)\n- [QuPath v0.2.3](https://github.com/qupath/qupath)\n- [NDP.View2](https://www.hamamatsu.com/jp/ja/product/life-science-and-medical-systems/digital-slide-scanner/U12388-01.html)\n- and your favorite tools with [custom parser](https://github.com/tand826/wsiprocess/wiki/How-to-use-custom-annotation-parser)\n\ndetails: [wiki](https://github.com/tand826/wsiprocess/wiki)\n\n# Available WSIs\n\n<details>\n    <summary>Test ongoing</summary>\n    <div>\n\n- From below we tested wsi data.\n\n  - :smile: => worked well.\n  - :umbrella: => did not work well.\n  - otherwise => did not check\n\n- Aperio\n\n  - CMU-1-JP2K-33005.svs\n  - :smile: CMU-1-Small-Region.svs\n  - :smile: CMU-1.svs\n  - CMU-2.svs\n  - CMU-3.svs\n  - JP2K-33003-1.svs\n  - JP2K-33003-2.svs\n\n- Generic-TIFF\n\n  - :umbrella:CMU-1.tiff\n    - Can not set magnification.\n\n- Hamamatsu-vms\n\n  - :smile:CMU-1.zip\n  - CMU-2.zip\n  - CMU-3.zip\n    - Could not DOWNLOAD from http://openslide.cs.cmu.edu/download/openslide-testdata/Hamamatsu-vms/\n\n- Hamamatsu\n\n  - :smile:CMU-1.ndpi\n  - CMU-2.ndpi\n  - CMU-3.ndpi\n  - OS-1.ndpi\n  - OS-2.ndpi\n  - OS-3.ndpi\n\n- Leica\n\n  - :smile:Leica-1.scn\n  - Leica-2.scn\n  - Leica-3.scn\n  - Leica-Fluorescence-1.scn\n\n- Mirax\n\n  - CMU-1-Exported.zip\n  - CMU-1-Saved-1_16.zip\n  - CMU-1-Saved-1_2.zip\n  - :umbrella:CMU-1.zip\n    - Can not make the foreground mask.\n  - CMU-2.zip\n  - CMU-3.zip\n  - Mirax2-Fluorescence-1.zip\n  - Mirax2-Fluorescence-2.zip\n  - Mirax2.2-1.zip\n  - Mirax2.2-2.zip\n  - Mirax2.2-3.zip\n  - Mirax2.2-4-BMP.zip\n  - Mirax2.2-4-PNG.zip\n\n- Olympus\n\n  - OS-1.zip\n  - OS-2.zip\n  - OS-3.zip\n\n- Trestle\n\n  - :umbrella:CMU-1.zip\n    - ASAP can not show the image properly, and it's hard to annotate.\n  - CMU-2.zip\n  - CMU-3.zip\n\n- Ventana\n\n  - OS-1.bif\n  - OS-2.bif\n\n- :umbrella:Zeiss : Can not load slide - :umbrella:Zeiss-1-Merged.zvi - :umbrella:Zeiss-1-Stacked.zvi - :umbrella:Zeiss-2-Merged.zvi - :umbrella:Zeiss-2-Stacked.zvi - :umbrella:Zeiss-3-Mosaic.zvi - :umbrella:Zeiss-4-Mosaic.zvi\n</div>\n</details>\n\n# Test\n\n### Download sample WSI\n\n```\ncurl -O -C - https://data.cytomine.coop/open/openslide/hamamatsu-ndpi/CMU-1.ndpi\n```\n\n### Make random annotation\n\n- Install ASAP ( Linux / Windows ) - https://github.com/computationalpathologygroup/ASAP/releases\n- Open CMU-1.ndpi and make some random annotation. - Save the annotation xml as \"CMU-1.xml\".\n\n### Run test.py\n\n```\ncd tests\npytest tests.py\n```\n\n# Citation\n\n```\n@software{takumi_ando_2022_5938308,\n  author       = {Takumi Ando},\n  title        = {tand826/wsiprocess: version 0.9},\n  month        = feb,\n  year         = 2022,\n  publisher    = {Zenodo},\n  version      = {v0.9},\n  doi          = {10.5281/zenodo.5938308},\n  url          = {https://doi.org/10.5281/zenodo.5938308}\n}\n```\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Whole Slide Image (WSI) Processing Library",
    "version": "1.1.1",
    "project_urls": {
        "Homepage": "https://github.com/tand826/wsiprocess"
    },
    "split_keywords": [
        "histopathology",
        "cytopathology",
        "medical-imaging",
        "whole-slide-imaging",
        "machine-learning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "328be3d1b4513b9d16fbf451c41ac06b27c64f486b2e7ef1ab40065dcfb36a9d",
                "md5": "8bab6444e397b29da9a55bdf80caaa3b",
                "sha256": "99cba6dc3ac52aadff43fd6f940c8bb363781a1027efedb60cc6789123c2d053"
            },
            "downloads": -1,
            "filename": "wsiprocess-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8bab6444e397b29da9a55bdf80caaa3b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 48357,
            "upload_time": "2023-09-08T04:58:19",
            "upload_time_iso_8601": "2023-09-08T04:58:19.446069Z",
            "url": "https://files.pythonhosted.org/packages/32/8b/e3d1b4513b9d16fbf451c41ac06b27c64f486b2e7ef1ab40065dcfb36a9d/wsiprocess-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e9d0795cf60e2a486ef7905702fb4ece5cea795d7343017cd1116f7287eade6e",
                "md5": "0fa896c7ac33fccd641885bfb057a8f8",
                "sha256": "d8e450092e552e623589caeacf196da8f925796b8f7cde9ad2d6fcc6ce2d91c3"
            },
            "downloads": -1,
            "filename": "wsiprocess-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0fa896c7ac33fccd641885bfb057a8f8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 38355,
            "upload_time": "2023-09-08T04:58:21",
            "upload_time_iso_8601": "2023-09-08T04:58:21.481394Z",
            "url": "https://files.pythonhosted.org/packages/e9/d0/795cf60e2a486ef7905702fb4ece5cea795d7343017cd1116f7287eade6e/wsiprocess-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-08 04:58:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tand826",
    "github_project": "wsiprocess",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "wsiprocess"
}
        
Elapsed time: 0.18149s