| 日本語 |
Divide Whole Slide Images (WSI) into tile-like segments and save the images after removing backgrounds and debris.
Tile images equivalent to x10, x20, and x40 magnifications are stored.
- Solving error messages caused by using
scipy.ndimage.morphology
.
- Solving errors that occur with the latest version of Numpy.
- Revised to save tile images at x10 magnification by default, along with minor code modifications related to this change.
- Revised the code for background and noise removal (keep_tile) to run in a multiprocessing environment.
For a sample slide (1900 tile images), the processing time improved from approximately 25 minutes to about 5 minutes.
- Aperio (.svs, .tif)
- Hamamatsu (.ndpi, .vms, .vmu)
- Leica (.scn)
- MIRAX (.mrxs)
- Philips (.tiff)
- Sakura (.svslide)
- Trestle (.tif)
- Ventana (.bif, .tif)
- Generic tiled TIFF (.tif)
Confirmed to work in the following environment (compatible with the latest versions of all libraries).
- Python 3.7.4
- openslide-python
- numpy
- pandas
- Pillow
- scipy
- scikit-image
- rich
- tqdm
-
Install OpenSlide
Linux
1-1.sudo apt-get install build-essential
1-2.sudo apt-get install openslide-tools
1-3.sudo apt-get install python-openslide
-
pip install openslide-python
. ├─ input .. Directory for placing the Whole Slide Images (WSI) to be processed. ├─ output .. Directory where the tile images are saved after processing. ├─ notebooks .. Notebooks for code verification └─ src └─ preprocessing.py
cd src
python preprocessing.py --<arg1> --<arg2>
-
In cases of processing specimens like cytology samples that have many margins.
python preprocessing.py --tissue_threshold 0.3
-
In cases where only tile images equivalent to x20 and x40 magnifications are desired to be saved.
python preprocessing.py --sample_size 256 512
python preprocessing.py --help