Skip to content

Interactive Segmentation

Interactive Segmentation segments a greyscale scan by example. You paint a few voxels as void or solid, a classifier learns from them, and you watch a segmented slice update until it looks right. Use it for scans a single threshold can't separate, such as uneven brightness or phases with overlapping grey levels.

  • Find it Tools › Segmentation › Interactive Segmentation
  • Needs a greyscale 3D image, up to 600 voxels along each axis
  • Returns a new binary image at the source's size and voxel size; the greyscale source is unchanged
  • Runs on CPU
  • Science Interactive Segmentation

Run it

  1. Open Tools, then Segmentation, and select Interactive Segmentation.
  2. Under Source, choose the Image. Only greyscale images are listed. The page loads a training patch: a square piece of one XY slice, under Brushing.
  3. Pick the Void or Solid brush, set its Radius, and paint inside each phase on the patch. Eraser removes paint; Undo and Redo step through your strokes, and the zoom buttons show a larger or smaller patch.
  4. Select Add → to register the patch's examples and move to another patch, or Skip to move on without them. Paint a few patches from different depths and both phases.
  5. Once both void and solid examples are registered, the Segmentation preview labels one complete slice. Choose its Plane and Slice index, and switch its View between Phase score, the classifier's score for each voxel, and Segmentation, the binary result. The status line gives the preview's void fraction.
  6. Paint more patches where the preview is wrong. Each Add → updates the preview. Change the classifier under Settings if you need to; your examples are kept.
  7. Under Output, keep or change the New image name. It defaults to the source's name followed by _segmented.
  8. Select Run. The job page opens and follows the job until it finishes.

Your examples and settings are saved whenever the preview updates, and the page's address then leads back to them, so you can bookmark it and carry on later.

In progress

Screenshot: the Interactive Segmentation page with a greyscale 3D image chosen, a training patch painted with cyan void and orange solid strokes, and a ready Segmentation preview beside it. Arrows to the Void/Solid/Eraser brush toggle, the Add → button, the preview's Plane menu and the preview status line with its void percentage.

Settings

Setting Default Range What it does
Image your team's greyscale images, up to 600 voxels per axis The scan to segment.
Brush Void Void, Solid, Eraser What a stroke paints. Later strokes replace earlier ones.
Radius 2 1–32 voxels The brush size. Zoom changes the display, not the brush.
Smallest feature scale (voxels) 0.5 0.1–8 The finest smoothing scale the classifier looks at.
Largest feature scale (voxels) 2 0.1–8 The coarsest smoothing scale, at least the smallest.
Number of feature scales 3 1–4 How many scales between the two.
Number of trees 50 1–100 The size of the classifier.
Maximum tree depth 12 1–16 How detailed each tree's decisions can be.
Training samples 5000 2–50,000 How many painted voxels the classifier trains on, half from each phase at most.
Random seed 0 0 or more Makes a run repeatable.
Void score cutoff 0.5 0.001–0.999 The score above which a voxel is void. Raise it to make less of the image pore.
New image name source name + _segmented The name of the binary image the run creates.

Results

The run labels every XY slice of the volume with the classifier the preview used, and saves a new binary image, pore 1 and solid 0, with the source's size and voxel size. Voxels you painted keep your label. The job page shows the Output image, and View output image under Available Actions opens it.

In progress

Screenshot: a completed Interactive Segmentation job page. Arrows to the Output image panel and to View output image under Available Actions.

Common problems

  • The image isn't in the list. It's already binary, or not yet ready.
  • The image is too large. Images can be up to 600 voxels along each axis, and a larger classifier needs a smaller image. Trim it or resize it, or go back to the default settings.
  • The preview doesn't appear. It needs examples of both phases. Paint some void and some solid, then select Add →.
  • Boundaries come out too thick or too thin. Move the Void score cutoff, or paint examples right at the edges of the pores.
  • The result is noisy. The classifier works slice by slice in XY. Paint more examples where it's wrong, or filter the scan first and segment the filtered copy.

Science

The features the classifier uses, how it trains and why its score isn't a probability: Interactive Segmentation in the Scientific reference.