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

C1C2C3-80-60-40-20020406080100120140160050100150200250300350Intensity (HU)Voxel count

Cluster statistics

ClusterCenter (HU)Voxels% of imageLikely tissue
C1-60.0091807.00044.1%Air / fat
C228.9871561.00038.1%Soft tissue
C3120.271728.00017.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.