Skip to main content

Module morphology

Module morphology 

Source
Expand description

Native pure-Rust morphology / cell-detection kernels.

Single-function files; uses cv::morph erode/dilate for top-hat. No Python / OpenCV.

Modules§

extended_minima
H-minima / extended minima on Gray8 (suppress shallow minima).
morphological_tophat
White / black morphological top-hat via existing 3×3 erode / dilate.
nucleus_features
Per-label nucleus geometry: area, circularity, axis ratio (PCA of region points).
positive_od_threshold
Optical-density threshold for positive cell fraction (Ki-67 style index).
voronoi_otsu_label
Voronoi–Otsu labeling (lite): Otsu threshold → distance peaks → watershed split.
watershed_markers
Marker-controlled watershed flooding on a gray topographic surface.

Structs§

NucleusFeature
Fixed-layout region feature (no heap).
OdPositiveIndex
Result of a positive-OD index computation.

Enums§

TopHatKind
Top-hat polarity.

Constants§

MAX_NUCLEUS_LABELS
Maximum distinct labels tracked in one pass (stack/table bound).
MAX_OD_LABELS
Maximum distinct nucleus labels for OD aggregation.

Functions§

extended_minima
Compute extended minima of a gray topographic surface.
intensity_to_od_u8
Map brightfield intensity to an 8-bit optical-density-like value.
morphological_tophat
Morphological top-hat into caller buffer (width * height bytes).
nucleus_features
Extract geometric features for each labeled nucleus region.
otsu_threshold_from_hist
Otsu threshold for a Gray8 histogram (returns 0 if image empty / single-tone).
positive_od_threshold
Compute Ki-67-style positive index from a gray channel and nucleus label map.
voronoi_otsu_label
Voronoi–Otsu label map: split touching bright objects.
watershed_markers
Marker-controlled watershed.