Skip to main content

Threshold Segmentation

The Threshold tool segments voxels from volume data based on their grayscale intensity values. Voxels within the specified range are included in the mask; voxels outside the range are excluded. This is one of the most fundamental and widely used segmentation techniques.

Accessing the Tool

  1. Navigate to the Segmentation tab in the ribbon.
  2. Click Threshold in the Create Mask section.

Parameters

Presets

Pre-configured threshold ranges for common materials and tissue types:

PresetDescription
CustomUser-defined threshold range.
Bone (CT)Threshold range typical for bone tissue in CT images.
Soft Tissue (CT)Threshold range for soft tissue in CT images.
AirThreshold range for air cavities.
tip

Presets provide starting points based on typical Hounsfield Unit (HU) values. Adjust the thresholds as needed for your specific dataset.

Threshold Adjustment

The histogram widget displays the intensity distribution of the volume data with interactive threshold controls:

ControlDescription
Lower ThresholdMinimum intensity value to include.
Upper ThresholdMaximum intensity value to include.
HistogramVisual representation of intensity distribution.

Drag the threshold handles or enter numeric values directly to adjust the range. The preview updates in real-time in the slice views.

Profile Line

The Profile Line tool helps identify appropriate threshold values by analyzing intensity values along a path:

  1. Enable the Profile Line group box.
  2. Draw a line across the region of interest in a slice view.
  3. The profile chart displays intensity values along the line.
  4. Use this information to identify appropriate threshold boundaries.

Result Options

OptionDescription
Target MaskSelect an existing mask or create a new one.
ReplaceReplace the existing mask content with the thresholded result.
MergeAdd the thresholded region to the existing mask content.

Workflow

  1. Open the Threshold tool from the Segmentation tab.
  2. Optionally select a Preset matching your target material.
  3. Adjust the Lower and Upper Threshold values using the histogram controls.
  4. Observe the preview overlay in the slice views.
  5. Use the Profile Line tool if you need to analyze specific intensity transitions.
  6. Select the target mask and result mode.
  7. Click Apply to create or update the mask.

Technical Background

Thresholding is a pixel-wise classification method that assigns each voxel to the foreground (inside the mask) or background based solely on its intensity value:

M(x,y,z)={1if TlowerI(x,y,z)Tupper0otherwiseM(x,y,z) = \begin{cases} 1 & \text{if } T_{lower} \leq I(x,y,z) \leq T_{upper} \\ 0 & \text{otherwise} \end{cases}

Where:

  • MM is the output mask
  • II is the input volume intensity
  • TlowerT_{lower} and TupperT_{upper} are the threshold bounds
note

Thresholding works well when the target structure has distinct intensity values from surrounding tissues. For structures with overlapping intensities, consider using region growing or more advanced segmentation methods.

Tips

  • Start with a wide threshold range and narrow it gradually.
  • Use the histogram to identify peaks corresponding to different tissue types.
  • Combine thresholding with region growing to isolate connected objects.
  • For noisy data, consider smoothing the volume before thresholding.

Scripting

Threshold segmentation is available via the Python scripting API:

import ScriptingApi as api

app = api.Application()
mask_operations = app.get_mask_operations()

threshold_params = api.ThresholdParams()
threshold_params.lower_threshold = 200
threshold_params.upper_threshold = 3000
threshold_params.filter_regions = True
threshold_params.remove_regions = True
threshold_params.min_region_size = 27
threshold_params.keep_largest = False

# Apply threshold segmentation
result_mask = mask_operations.threshold('CT_Volume', threshold_params)

See the MaskOperations API Reference for details.

See Also