liveBook · Manning

Segmentation mask

As explained in Geometry for Programmers

An image mask is a 3D image whose cells indicate, typically with a single bit, whether corresponding spatial regions belong to a selected object or structure.

A segmentation mask is an equal-size 3D image that replaces grayscale measurements with a bit indicating whether each voxel belongs to a selected object or structure. Creating the mask from image data is called segmentation. Masks are also called voxel models. section 12.0

The representation turns a difficult-to-operate grayscale image into a practical spatial model. Filled and unfilled voxels support Boolean intersection, unification, and subtraction, as well as dilation and erosion. section 12.0 section 12.3.4

A mask can support several operations and extensions:

  • Intersection keeps voxels filled in both models. section 12.3.4
  • Unification keeps voxels filled in either model. section 12.3.4
  • Subtraction keeps filled voxels from the first model that the second does not cover. section 12.3.4
  • An extended mask can store a distance to the nearest region of interest instead of only a membership bit. section 12.0

Combining voxel models

To combine two segmented bodies, apply Boolean operations directly to their filled and unfilled voxels. This simplicity makes multistep voxel workflows comparatively robust. section 12.3.4

Figure 12.1 The same data (a) represented as an array of colors: a 2D 4×2 image made of pixels (b) and a 3D 2×2×2 image made of voxels (c)
12-01

Compare pixels and voxels as arrays: a 3D image is an array of 2D images whose colored cubes represent spatial cells. section 12.0

How Geometry for Programmers covers it

How deep it goes
Defines voxel membership and outlines Boolean operations, while deferring segmentation details and extended mask information.
Examples
Uses filled voxel models, Boolean intersection, unification, subtraction, and distance-valued mask extensions.
What it assumes
Assumes familiarity with 3D images and grayscale data while explaining pixels, voxels, masks, and segmentation from their basic relationship.
What you can do after
Apply Boolean intersection, unification, and subtraction to voxel models and combine them with dilation or erosion.
How it connects
Connects segmentation masks with 3D images, voxels, segmentation, Boolean operations, dilation, and erosion.

Also explained in

Compare how 4 books explain segmentation mask →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Geometry for Programmers. The section links point to the parts of the book it draws on.