Skip to main content

VoidInclusionSegmentationParams

Other

Parameters for void/inclusion segmentation.

Import

import ScriptingApi as api

# Create parameter instance
params = api.VoidInclusionSegmentationParams()

Properties

mode

Detection mode: mode=0 for Void (Detect dark defects (voids/air) inside material) or mode=1 for Inclusion (Detect bright defects (dense inclusions) inside material).

Type: int


method

Contrast method: method=0 for Absolute (uses absolute contrast threshold), method=1 for Relative (uses relative contrast percentage of (materialGray - airGray)).

Type: int


roi_mask_name

Optional mask object to restrict the analysis to a specific region of interest (ROI). Only voxels inside the ROI mask will be considered for defect detection. If no mask is provided, the entire volume object will be analyzed.

Type: str


auto_estimate_absolute_contrast

Auto-estimate absolute contrast threshold from histogram peaks.

Type: bool


absolute_contrast_threshold

Absolute contrast threshold (used when autoEstimateAbsoluteContrast=False).

Type: float


relative_contrast_percent

Relative contrast percentage (only used when method=0).

Type: float


auto_air_gray_value

Auto-estimate air gray value from histogram.

Type: bool


air_gray_value

Air gray value (only used when autoAirGrayValue=False).

Type: float


enable_geometric_filtering

Enable geometric filtering (compactness, sphericity, etc.).

Type: bool


probability_threshold

Minimum probability for defect acceptance (0.0 - 1.0).

Type: float


min_voxel_count

Minimum voxel count for components (0 to disable).

Type: int


max_voxel_count

Maximum voxel count for components (0 for unlimited).

Type: int


min_compactness

Minimum compactness (0.0 - 1.0).

Type: float


max_compactness

Maximum compactness (0.0 - 1.0).

Type: float


min_sphericity

Minimum sphericity (0.0 - 1.0).

Type: float


max_sphericity

Maximum sphericity (0.0 - 1.0).

Type: float


min_volume_fraction

Minimum volume fraction in percentage (0.0 - 100.0).

Type: float


max_volume_fraction

Maximum volume fraction in percentage (0.0 - 100.0).

Type: float


min_equivalent_diameter

Minimum equivalent diameter in mm.

Type: float


max_equivalent_diameter

Maximum equivalent diameter in mm.

Type: float


max_component_count

Maximum number of components to retain after filtering (0 for unlimited).

Type: int


See Also