alterlab-histolab

Solid

Extract and preprocess tiles from whole-slide images (WSI) with histolab — tissue detection, tile extraction (Random/Grid/Score tilers), and H&E stain normalization (Macenko/Reinhard). Use for lightweight slide pipelines, building tile datasets for ML, or quick tile-based analysis of histopathology slides — for advanced spatial proteomics, multiplexed imaging, or full deep-learning pathology pipelines use pathml. Part of the AlterLab Academic Skills suite.

AI & Automation 27 stars 4 forks Updated today MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
48
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Histolab ## Overview Histolab is a Python library for processing whole slide images (WSI) in digital pathology. It automates tissue detection, extracts informative tiles from gigapixel images, and prepares datasets for deep learning pipelines. The library handles multiple WSI formats, implements sophisticated tissue segmentation, and provides flexible tile extraction strategies. ## When to Use This Skill Use histolab for lightweight WSI tile pipelines: tissue detection, building tile datasets for ML training, H&E stain handling, and quick tile-based analysis of histopathology slides. For advanced spatial proteomics, multiplexed imaging, or full deep-learning pathology pipelines, use `pathml` instead. ## Installation ```bash uv pip install "histolab==0.7.0" ``` histolab wraps the **OpenSlide** C library, which is not bundled with the pip package. On macOS install it with `brew install openslide`; without it, any `import histolab.slide` fails with `Couldn't locate OpenSlide dylib`. The examples below are pinned to histolab 0.7.0; the API differs in older releases. ## Core Workflow 1. **Load** the slide with `Slide(path, processed_path=...)` and inspect dimensions/levels. 2. **Detect tissue** with a mask (`TissueMask` or `BiggestTissueBoxMask`). 3. **Preview** tile locations with `tiler.locate_tiles(slide)` before committing. 4. **Extract** tiles with one of three tilers (Random/Grid/Score). Minimal example: ```python from histolab.slide import Slide from histolab.t...

Details

Author
AlterLab-IEU
Repository
AlterLab-IEU/AlterLab-Academic-Skills
Created
2 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category