histolab
Lightweight WSI tile extraction and preprocessing. Use for basic slide processing tissue detection, tile extraction, stain normalization for H&E images. Best for simple pipelines, dataset preparation, quick tile-based analysis. For advanced spatial proteomics, multiplexed imaging, or deep learning pipelines use pathml.
npx skills add majiayu000/claude-skill-registry --skill histolab-aiskillstore-marketplace --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 automates tissue detection, tile extraction, and dataset preparation for whole slide images (WSIs). It supports loading WSIs, detecting tissue, and extracting tiles with three strategies (RandomTiler, GridTiler, ScoreTiler). It also includes masks (e.g., TissueMask, BiggestTissueBoxMask) and preprocessing filters to refine extraction and quality control for downstream deep learning workflows.
How it works
- Load and manage WSIs via the Slide class; access metadata, levels, and properties.
- Tissue detection with masks (TissueMask, BiggestTissueBoxMask) to identify tissue regions and filter tiles.
- Tile extraction using three strategies:
- RandomTiler: extract a fixed number of randomly positioned tiles; uses n_tiles and seed for reproducibility.
- GridTiler: systematic, grid-based tile extraction across tissue; uses pixel_overlap and check_tissue.
- ScoreTiler: select top tiles based on a scorer (e.g., NucleiScorer).
- Preprocessing and filtering via image and morphological filters, combined with Compose to create pipelines; apply these to tiles before extraction.
- Visualization helpers for slides, masks, and tile locations; preview before extraction.
- Optional extraction_mask to constrain tiles to designated regions.
When to use it
- When you need quick tile-based analysis or dataset preparation for simple pipelines.
- When performing exploratory tile sampling, grid coverage, or quality-driven tile selection across slides.
- When you want to preprocess tiles with customizable tissue-detection filters before extraction.
What it can touch
- Tools and classes referenced: Slide, TissueMask, BiggestTissueBoxMask, RandomTiler, GridTiler, ScoreTiler, NucleiScorer, TissueMask, Compose, RgbToGrayscale, OtsuThreshold, BinaryDilation, RemoveSmallHoles, RemoveSmallObjects, locat_mask(), locate_tiles(), extract().
- Extraction can use an extraction_mask to limit results; tile preview via locate_tiles().
Caveats
- License declarations include Apache-2.0; ensure compliance.
- Best for basic pipelines; for advanced spatial proteomics, multiplexed imaging, or deep learning pipelines, alternative paths like pathml are recommended.
# 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?
Lightweight WSI tile extraction and preprocessing. Use for basic slide processing tissue detection, tile extraction, stain normalization for H&E images. Best for simple pipelines, dataset preparation, quick tile-based analysis. For advanced spatial proteomics, multiplexed imaging, or deep learning pipelines use pathml.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill histolab-aiskillstore-marketplace --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 majiayu000/claude-skill-registry, a repository with 534 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.
