histolab

Automates WSI tissue detection, tile extraction, and preprocessing using OpenSlide and scikit-image.

1|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/yf8578/clawomics --skill histolab-yf8578
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: histolab
Source: https://github.com/yf8578/clawomics/tree/main/skills/histolab
Command: npx skills add https://github.com/yf8578/clawomics --skill histolab-yf8578

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill automates the complex and time-consuming process of analyzing whole slide images (WSIs) in digital pathology, enabling efficient tissue detection, tile extraction, and preprocessing for downstream analysis.

Core Features & Use Cases

  • WSI Loading & Inspection: Load and inspect various WSI formats, access metadata, and generate thumbnails.
  • Tissue Detection & Masking: Automatically identify and segment tissue regions, excluding background and artifacts.
  • Flexible Tile Extraction: Extract tiles using random sampling, grid patterns, or score-based selection.
  • Image Filtering & Preprocessing: Apply a suite of filters for stain normalization, artifact removal, and quality control.
  • Visualization Tools: Preview masks, tile locations, and extracted tiles for validation.
  • Use Case: A researcher needs to prepare gigapixel whole slide images for a deep learning model. This Skill can automatically extract thousands of 512x512 pixel tiles from the tissue regions, ensuring consistent preprocessing and data quality.

Quick Start

Use the histolab skill to extract 100 random 512x512 tiles from the slide 'patient_001.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 deep learning?

Extracting tiles from whole slide images for deep learning involves automated tissue detection and tile extraction using Python libraries like OpenSlide and scikit-image. This Skill supports random sampling and grid patterns to generate consistent, high-quality image tiles for model training.

What is whole slide image tissue detection and masking in digital pathology?

Whole slide image tissue detection and masking in digital pathology is the automated process of identifying and segmenting tissue regions while excluding background and artifacts. This ensures that only relevant tissue areas are processed for downstream quantitative analysis.

Does this tile extraction method support different whole slide imaging formats?

Yes, this tile extraction method supports various whole slide imaging formats. It utilizes Python libraries like OpenSlide to load and inspect multiple WSI formats, access metadata, and generate thumbnails for comprehensive digital pathology applications.

How do I apply stain normalization and artifact removal during image preprocessing?

To apply stain normalization and artifact removal during image preprocessing, you can use a suite of integrated image filtering tools. These filters operate on extracted whole slide image tiles to ensure consistent data quality and stain standardization for downstream analysis.

What is the best way to prepare gigapixel whole slide images for a deep learning model?

The best way to prepare gigapixel whole slide images for a deep learning model is to automate tissue detection and extract thousands of fixed-size tiles, such as 512x512 pixels, from tissue regions. This ensures consistent preprocessing and data quality.

Why do I need to exclude background and artifacts when processing whole slide images?

You need to exclude background and artifacts when processing whole slide images to ensure accurate tissue detection and high-quality tile extraction. Automatically segmenting tissue regions prevents irrelevant data from skewing downstream deep learning and quantitative analysis.