Intensity Segmentation Explorer
Segment a synthetic abdominal slice by intensity clustering and thresholding, with smoothing and K under your control.
- segmentation
- k-means
- Otsu
- smoothing
Original image
k-means segmentation (K=3, σ=0)
Intensity histogram with cluster centers
Cluster statistics
| Cluster | Center (HU) | Voxels | % of image | Likely tissue |
|---|---|---|---|---|
| C1 | -60.009 | 1807.000 | 44.1% | Air / fat |
| C2 | 28.987 | 1561.000 | 38.1% | Soft tissue |
| C3 | 120.271 | 728.000 | 17.8% | Enhancing tissue |
The tumor spans multiple intensity classes
The enhancing rim, necrotic core and calcification of a real tumor occupy different HU ranges. K-means on intensity alone fragments a single lesion across clusters and merges tumor voxels with normal tissue that happens to share the same HU. Spatial smoothing adds coherence but blurs the true anatomical boundary — no setting of K or σ recovers "this whole region is the tumor" without spatial or supervised priors.