Skip to main content

ThresholdParams

Parameters

Parameters for range-based threshold segmentation.

Import

import ScriptingApi as api

# Create parameter instance
params = api.ThresholdParams()

Properties

target_mask_name

Name of the target mask, if empty a new mask will be created.

Type: str


lower_threshold

Lower threshold grayvalue. Voxels with values >= lowerThreshold are included.

Type: float


upper_threshold

Upper threshold grayvalue. Voxels with values <= upperThreshold are included.

Type: float


fill_cavities

Fill cavities in the resulting mask.

Type: bool


filter_regions

Enable region filtering.

Type: bool


keep_largest

Keep only the largest regions (used when filterRegions=true).

Type: bool


remove_regions

Remove regions smaller than regionSize (used when filterRegions=true and keepLargest=false).

Type: bool


min_region_size

Minimum region size in voxels (used when removeRegions=true).

Type: int


replace_result

Replace the target mask content. If false, merges with existing mask.

Type: bool


See Also