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
- Navigate to the Segmentation tab in the ribbon.
- Click Threshold in the Create Mask section.
Parameters
Presets
Pre-configured threshold ranges for common materials and tissue types:
| Preset | Description |
|---|---|
| Custom | User-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. |
| Air | Threshold range for air cavities. |
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:
| Control | Description |
|---|---|
| Lower Threshold | Minimum intensity value to include. |
| Upper Threshold | Maximum intensity value to include. |
| Histogram | Visual 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:
- Enable the Profile Line group box.
- Draw a line across the region of interest in a slice view.
- The profile chart displays intensity values along the line.
- Use this information to identify appropriate threshold boundaries.
Result Options
| Option | Description |
|---|---|
| Target Mask | Select an existing mask or create a new one. |
| Replace | Replace the existing mask content with the thresholded result. |
| Merge | Add the thresholded region to the existing mask content. |
Workflow
- Open the Threshold tool from the Segmentation tab.
- Optionally select a Preset matching your target material.
- Adjust the Lower and Upper Threshold values using the histogram controls.
- Observe the preview overlay in the slice views.
- Use the Profile Line tool if you need to analyze specific intensity transitions.
- Select the target mask and result mode.
- 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:
Where:
- is the output mask
- is the input volume intensity
- and are the threshold bounds
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
- Multilevel Thresholding — Automatic multi-threshold segmentation.
- Iso-Threshold — Single-value threshold segmentation.
- Region Grow — Grow regions from seed points.
- Segmentation Tab Overview — Overview of all segmentation tools.