Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
build_error
glibcpy 3.10–3.910 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
histomicstk
✓ import histomicstk as htk
✗ import HistomicsTK
Case-sensitive; package is lowercase
segmentation.nuclear_segmentation
✓ from histomicstk.segmentation import nuclear_segmentation
✗ from histomicstk.segmentation.nuclei import nuclear_segmentation
Old path deprecated; use nuclear_segmentation submodule
features.compute_haralick_features
✓ from histomicstk.features import compute_haralick_features
✗ from histomicstk.features.haralick import compute_haralick_features
Haralick features moved to top-level features module in v1.4.0
Basic example of computing Haralick features from a 2D image. For whole-slide images, you need to install 'large_image' and use it to read tiles.
import histomicstk as htk
import numpy as np
# Load a sample image (replace with your own)
# For whole-slide images, use large_image
# Here we simulate a 2D grayscale image
image = np.random.rand(100, 100).astype(np.float32)
# Compute Haralick texture features
from histomicstk.features import compute_haralick_features
haralick = compute_haralick_features(image, return_labels=True)
print(haralick['Harmonic mean'])
# Nuclear segmentation (requires stain normalization first)
from histomicstk.segmentation import nuclear_segmentation
# nuclei_df, nuclei_im = nuclear_segmentation.nuclei_segmentation(image) # requires proper staining
histomics --version
Upgrade
Version history
1.4.0latest on PyPI · released Feb 7, 2025
Audit
Dependencies
large_imageoptionalFor reading whole-slide images (openslide, DICOM, etc.)
numpyrequiredCore numerical computation
scikit-imagerequiredImage processing algorithms
pandasrequiredDataFrame operations for features
shapelyrequiredGeometric operations for annotations