Registry / storage / wsidicom

wsidicom

JSON →
library0.30.0pypypi✓ verified 84d ago

Library for reading and writing DICOM Whole Slide Images (WSI). Current version 0.30.0, released irregularly. Supports Python >=3.10.

pip install wsidicom
INSTALL
IMPORT
SIG · WSIDICOM
W
wsidicom
storagepythonv0.30.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WsiDicom
from wsidicom import WsiDicom

Open a DICOM WSI file and read the highest resolution level.

from wsidicom import WsiDicom with WsiDicom.open('slide.dcm') as wsi: level = wsi.read_level(0) print(level.shape)
Debug
Known issues
breakingPython 3.9 support dropped; requires Python >=3.10 in 0.30.0.
fix
Use Python 3.10+ or pin to wsidicom <0.30.0.
affects: >=0.30.0
gotchaThe library can read large WSIs, but writing is experimental and may produce non-conformant DICOM instances.
fix
Validate output with a DICOM validator before clinical use.
affects: all
gotchaOpening a slide without a context manager may leave file handles open on errors.
fix
Always use 'with WsiDicom.open(...)'.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'wsidicom'
wsidicom not installed or installed in the wrong environment.
fix
Run 'pip install wsidicom' in the same Python environment.
KeyError: 'instance_number'
The DICOM file is missing required tags for WSI metadata.
fix
Ensure the input file is a valid DICOM WSI. Some vendors may not adhere to the standard.
ValueError: Invalid DICOM file
File is not DICOM or is corrupted.
fix
Verify the file is a DICOM WSI. Use 'dcmdump' or similar tool to inspect.
Upgrade
Version history
0.30.0latest on PyPI · released May 22, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
33 hits · last 30 days
node
30
OpenAI (training)
1
Resources
wsidicom — pip install wsidicom · libregistry