histolab
Digital pathology image processing toolkit for whole slide images (WSI). Use this skill when working with histopathology slides, processing H&E or IHC stained tissue images, extracting tiles from gigapixel pathology images, detecting tissue regions, segmenting tissue masks, or preparing datasets for computational pathology deep learning pipelines. Applies to WSI formats (SVS, TIFF, NDPI), tile-based analysis, and histological image preprocessing workflows.
npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill histolab --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
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.
How it works
- Install via: ```bash uv pip install histolab
- Load a slide using the Slide class, configure a tiler (RandomTiler, GridTiler, or ScoreTiler), and then preview tile locations with ```tiler.locate_tiles(slide, n_tiles=...)``` before extracting. Example workflows show creating a slide, initializing a tiler with tile_size, level, and other parameters, previewing locations, and calling ```tiler.extract(slide)```.
- Core capabilities include: Slide Management (load WSI, access metadata, thumbnails), Tissue Detection and Masks (TissueMask, BiggestTissueBoxMask, BinaryMask), Tile Extraction (RandomTiler, GridTiler, ScoreTiler with optional scorers), Filters and Preprocessing (compose image filters), Visualization (locate_mask, locate_tiles, thumbnails, reports), and Typical Workflows (exploratory, grid, quality-driven, multi-slide, custom tissue detection).
- Filtering pipelines can be composed and applied to tiles or masks, and custom TissueMask workflows can be built with these filters.
## When to use it
- When working with histopathology slides (H&E or IHC) to extract tiles from gigapixel images for datasets or analysis.
- When you need tissue region detection, mask creation, and tile extraction strategies (random, grid, or score-based).
- When preparing datasets for computational pathology deep learning pipelines across WSI formats (SVS, TIFF, NDPI).
## What it can touch
- Tooling shown includes `Slide`, `RandomTiler`, `GridTiler`, `ScoreTiler`, `NucleiScorer`, and various mask and filter classes. Commands and class names are used as shown in the examples: `Slide`, `prostate_tissue`, `prostate_path`, `tile_size`, `level`, `seed`, `locate_tiles`, `extract`, `TissueMask`, `BiggestTissueBoxMask`, `BinaryMask`, `Compose`, `RgbToGrayscale`, `OtsuThreshold`, `BinaryDilation`, `RemoveSmallObjects`, `RemoveSmallHoles`, `locate_mask`.
## Caveats
- Installation line shows a potential typo as `uv pip install histolab`; this is as shown in the material and may require correction to a standard command like `pip install histolab`.
- The content includes multiple examples and references to documentation files (e.g., `references/slide_management.md`), but only the portions described here are considered facts.
# 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. ## Installation ```bash uv pip install histolab ``` ## Quick Start Basic workflow for extracting tiles from a whole slide image: ```python from histolab.slide import Slide from histolab.tiler import RandomTiler # Load slide slide = Slide("slide.svs", processed_path="output/") # Configure tiler tiler = RandomTiler( tile_size=(512, 512), n_tiles=100, level=0, seed=42 ) # Preview tile locations tiler.locate_tiles(slide, n_tiles=20) # Extract tiles tiler.extract(slide) ``` ## Core Capabilities ### 1. Slide Management Load, inspect, and work with whole slide images in various formats. **Common operations:** - Loading WSI files (SVS, TIFF, NDPI, etc.) - Accessing slide metadata (dimensions, magnification, properties) - Generating thumbnails for visualization - Working with pyramidal image structures - Extractin
- Overview
- Installation
- Quick Start
- Core Capabilities
- 1. Slide Management
- 2. Tissue Detection and Masks
- 3. Tile Extraction
- 4. Filters and Preprocessing
- 5. Visualization
- Typical Workflows
- Workflow 1: Exploratory Tile Extraction
- Workflow 2: Comprehensive Grid Extraction
- Workflow 3: Quality-Driven Tile Selection
- Workflow 4: Multi-Slide Processing Pipeline
uv pip install histolab
What does the histolab skill do?
Digital pathology image processing toolkit for whole slide images (WSI). Use this skill when working with histopathology slides, processing H&E or IHC stained tissue images, extracting tiles from gigapixel pathology images, detecting tissue regions, segmenting tissue masks, or preparing datasets for computational pathology deep learning pipelines. Applies to WSI formats (SVS, TIFF, NDPI), tile-based analysis, and histological image preprocessing workflows.
How do I install it?
Run `npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill histolab --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From FreedomIntelligence/OpenClaw-Medical-Skills, a repository with 2,909 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
