histolab

Automate whole slide image processing for tissue detection and tile extraction.

8|Updated Jan 13, 2026
One-click install
npx skills add https://github.com/hxk622/TokenDance --skill histolab-hxk622
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: histolab
Source: https://github.com/hxk622/TokenDance/tree/main/backend/app/skills/builtin/scientific/clinical/histolab
Command: npx skills add https://github.com/hxk622/TokenDance --skill histolab-hxk622

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires histolab, openslide-python, pillow, numpy, scikit-image, opencv-python, pandas, matplotlib, seaborn, ipywidgets, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the complex and time-consuming process of extracting and preprocessing tiles from large whole slide images (WSIs) in digital pathology, making them ready for analysis or deep learning.

Core Features & Use Cases

  • Tissue Detection & Masking: Automatically identify and segment tissue regions, filtering out background and artifacts.
  • Tile Extraction: Extract uniform tiles from WSIs using various strategies (random, grid, score-based).
  • Image Preprocessing: Apply filters for stain normalization, artifact removal, and quality control.
  • Use Case: Prepare a dataset of 512x512 pixel tiles from hundreds of H&E stained prostate cancer slides, ensuring each tile contains at least 80% tissue, for training a deep learning model to detect tumor regions.

Quick Start

Use the histolab skill to extract 100 random 512x512 tiles from the slide file 'slide.svs' and save them to the 'output/tiles/' directory.

Frequently Asked Questions about histolab

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract tiles from whole slide images for digital pathology?

You can extract tiles from whole slide images by automating tissue detection and using random, grid, or score-based strategies. This Skill processes large WSI files to extract uniform tiles for dataset preparation.

What is whole slide image preprocessing for computational pathology?

Whole slide image preprocessing for computational pathology involves detecting and segmenting tissue regions while filtering out background and artifacts. It applies stain normalization and quality control filters to prepare H&E slides for analysis.

Does OpenSlide work with H&E stained slides for tissue masking?

Yes, OpenSlide works with H&E stained slides for tissue masking. This Skill utilizes OpenSlide and Pillow for efficient image handling, automatically identifying and segmenting tissue regions across various WSI formats.

Can I extract uniform 512x512 pixel tiles from WSI files?

Yes, you can extract uniform 512x512 pixel tiles from WSI files. The Skill allows you to specify tile dimensions and apply tissue coverage constraints, such as an 80% minimum threshold, for deep learning dataset preparation.

What's the best way to prepare H&E slide datasets for deep learning models?

The best way to prepare H&E slide datasets for deep learning models is to automate tile extraction and image preprocessing. This Skill handles tissue detection, artifact removal, and stain normalization to ensure high-quality input data.

What are the limitations of tile extraction for whole slide images?

Limitations of tile extraction for whole slide images include potential artifacts in the extracted tiles. This Skill mitigates these issues by applying image preprocessing filters for artifact removal and stain normalization during dataset preparation.