histolab
Process whole slide images for digital pathology
Also available from: davila7
Histolab automates tissue detection and tile extraction from gigapixel whole slide images. It processes WSI files to extract informative tiles for deep learning pipelines and medical research.
Download the skill ZIP
Upload in Claude
Go to Settings → Capabilities → Skills → Upload skill
Toggle on and start using
Test it
Using "histolab". Extract 100 tiles from prostate tissue slide
Expected outcome:
- Loaded slide: prostate.svs (dimensions: 46000×32000 pixels)
- Created RandomTiler with 512×512 tile size
- Applied tissue mask filtering (80% threshold)
- Extracted 100 tiles to output/prostate_tiles/
- Generated preview visualization showing tile locations
- Average tissue coverage: 87% across extracted tiles
Using "histolab". Create tissue mask and visualize
Expected outcome:
- Initialized TissueMask with default filters
- Generated binary mask (tissue: 72%, background: 28%)
- Saved mask visualization to output/mask_preview.png
- Detected 3 tissue regions with varying sizes
Security Audit
SafeDocumentation-only skill containing markdown files with Python code examples for histolab, a legitimate digital pathology library. All 389 static findings are false positives - backticks are markdown syntax for code blocks (not Ruby/shell execution), no actual cryptographic or malicious patterns exist, and no executable code is present. This is a safe scientific tool for processing whole slide images.
Risk Factors
⚡ Contains scripts (1)
⚙️ External commands (1)
Quality Score
What You Can Build
Prepare training datasets from pathology slides
Extract balanced tile datasets from whole slide images for training deep learning models in cancer detection and classification.
Build automated tissue analysis pipelines
Create reproducible workflows for tissue segmentation, tile extraction, and quality assessment across slide collections.
Standardize slide preprocessing workflows
Implement consistent tissue detection and tile extraction procedures for research studies and clinical trials.
Try These Prompts
Load the slide at path 'slide.svs' and extract 100 random tiles of size 512x512 pixels. Save them to 'output/tiles/' directory.
Create a tissue mask for my slide and visualize it. Use the BiggestTissueBoxMask to focus on the main tissue section.
Extract tiles in a grid pattern across all tissue regions with 20% overlap. Use tissue mask to avoid background areas.
Use ScoreTiler with NucleiScorer to extract the 50 tiles with highest nuclei density. Generate a report of tile scores.
Best Practices
- Always preview tile locations with locate_tiles() before extraction to verify settings
- Use appropriate pyramid level - level 0 for full resolution, level 1-2 for faster processing
- Set tissue_percent threshold between 70-90% to balance coverage and quality
Avoid
- Extracting all tiles at highest resolution without considering memory constraints
- Using RandomTiler without setting a seed for reproducible results
- Skipping tissue mask preview which may lead to extracting background tiles
Frequently Asked Questions
What file formats does histolab support?
How do I handle slides with multiple tissue sections?
Can I extract tiles at multiple resolutions?
How do I remove pen annotations from slides?
What is the difference between RandomTiler and GridTiler?
How can I speed up extraction for large datasets?
Developer Details
Author
K-Dense-AILicense
Apache-2.0 license
Repository
https://github.com/K-Dense-AI/claude-scientific-skills/tree/main/scientific-skills/histolabRef
main
File structure