Skip to main content

AnalysisOperations

Operations

Provides tools for creating, running, and managing analysis objects. Supports wall thickness, deviation, curvature, extrema, gray value, and void/inclusion analyses on mask and surface objects. Enables programmatic access to analysis results and statistics.

Import​

import ScriptingApi as api

# Access via Application
app = api.Application()
ops = app.get_analysis_operations()

Methods​

Creation​

create_wall_thickness_analysis_mask​

Creates a wall thickness analysis on a mask object. Ray casting selects a normal-direction intersection; shrinking sphere iteratively selects an opposing surface contact. For either method, each valid result value is the Euclidean distance between its two stored surface-contact endpoints, so a distance measurement created from those endpoints has the same length.

Signature:

create_wall_thickness_analysis_mask(analysisName: str, maskName: str, params: WallThicknessParams = WallThicknessParams()) -> str

Parameters:

ParameterTypeDescription
analysisNamestrName for the new analysis object. If empty, a name is auto-generated.
maskNamestrName of the mask object to analyze.
paramsWallThicknessParamsWall thickness analysis parameters. Use api.WallThicknessParams().

Returns: str — The name of the created analysis object.


create_wall_thickness_analysis_surface​

Creates a wall thickness analysis on a surface object. Ray casting selects a normal-direction intersection; shrinking sphere iteratively selects an opposing surface contact. For either method, each valid result value is the Euclidean distance between its two stored surface-contact endpoints, so a distance measurement created from those endpoints has the same length.

Signature:

create_wall_thickness_analysis_surface(analysisName: str, surfaceName: str, params: WallThicknessParams = WallThicknessParams()) -> str

Parameters:

ParameterTypeDescription
analysisNamestrName for the new analysis object. If empty, a name is auto-generated.
surfaceNamestrName of the surface object to analyze.
paramsWallThicknessParamsWall thickness analysis parameters. Use api.WallThicknessParams().

Returns: str — The name of the created analysis object.


create_deviation_analysis_mask_vs_mask​

Creates a deviation analysis comparing two mask objects using closest-point distances to the reference surface. Mean and standard-deviation results weight each vertex sample by its represented actual-surface area.

Signature:

create_deviation_analysis_mask_vs_mask(analysisName: str, actualMaskName: str, referenceMaskName: str, params: DeviationParams = DeviationParams()) -> str

Parameters:

ParameterTypeDescription
analysisNamestrName for the new analysis object. If empty, a name is auto-generated.
actualMaskNamestrName of the actual (measured) mask object.
referenceMaskNamestrName of the reference (nominal) mask object.
paramsDeviationParamsDeviation analysis parameters. Use api.DeviationParams().

Returns: str — The name of the created analysis object.


create_deviation_analysis_surface_vs_surface​

Creates a deviation analysis comparing two surface objects using closest-point distances to the reference surface. Mean and standard-deviation results weight each vertex sample by its represented actual-surface area.

Signature:

create_deviation_analysis_surface_vs_surface(analysisName: str, actualSurfaceName: str, referenceSurfaceName: str, params: DeviationParams = DeviationParams()) -> str

Parameters:

ParameterTypeDescription
analysisNamestrName for the new analysis object. If empty, a name is auto-generated.
actualSurfaceNamestrName of the actual (measured) surface object.
referenceSurfaceNamestrName of the reference (nominal) surface object.
paramsDeviationParamsDeviation analysis parameters. Use api.DeviationParams().

Returns: str — The name of the created analysis object.


create_deviation_analysis_mask_vs_surface​

Creates a deviation analysis comparing a mask to a surface object using closest-point distances to the reference surface. Mean and standard-deviation results weight each vertex sample by its represented actual-surface area.

Signature:

create_deviation_analysis_mask_vs_surface(analysisName: str, actualMaskName: str, referenceSurfaceName: str, params: DeviationParams = DeviationParams()) -> str

Parameters:

ParameterTypeDescription
analysisNamestrName for the new analysis object. If empty, a name is auto-generated.
actualMaskNamestrName of the actual (measured) mask object.
referenceSurfaceNamestrName of the reference (nominal) surface object.
paramsDeviationParamsDeviation analysis parameters. Use api.DeviationParams().

Returns: str — The name of the created analysis object.


create_curvature_analysis_mask​

Creates a curvature analysis on a mask object.

Signature:

create_curvature_analysis_mask(analysisName: str, maskName: str, params: CurvatureParams = CurvatureParams()) -> str

Parameters:

ParameterTypeDescription
analysisNamestrName for the new analysis object. If empty, a name is auto-generated.
maskNamestrName of the mask object to analyze.
paramsCurvatureParamsCurvature analysis parameters. Use api.CurvatureParams().

Returns: str — The name of the created analysis object.


create_curvature_analysis_surface​

Creates a curvature analysis on a surface object.

Signature:

create_curvature_analysis_surface(analysisName: str, surfaceName: str, params: CurvatureParams = CurvatureParams()) -> str

Parameters:

ParameterTypeDescription
analysisNamestrName for the new analysis object. If empty, a name is auto-generated.
surfaceNamestrName of the surface object to analyze.
paramsCurvatureParamsCurvature analysis parameters. Use api.CurvatureParams().

Returns: str — The name of the created analysis object.


create_extrema_analysis_mask​

Creates an extrema analysis on a mask object.

Signature:

create_extrema_analysis_mask(analysisName: str, maskName: str, params: ExtremaParams = ExtremaParams()) -> str

Parameters:

ParameterTypeDescription
analysisNamestrName for the new analysis object. If empty, a name is auto-generated.
maskNamestrName of the mask object to analyze.
paramsExtremaParamsExtrema analysis parameters. Use api.ExtremaParams().

Returns: str — The name of the created analysis object.


create_extrema_analysis_surface​

Creates an extrema analysis on a surface object.

Signature:

create_extrema_analysis_surface(analysisName: str, surfaceName: str, params: ExtremaParams = ExtremaParams()) -> str

Parameters:

ParameterTypeDescription
analysisNamestrName for the new analysis object. If empty, a name is auto-generated.
surfaceNamestrName of the surface object to analyze.
paramsExtremaParamsExtrema analysis parameters. Use api.ExtremaParams().

Returns: str — The name of the created analysis object.


create_gray_value_analysis_mask​

Creates a gray value analysis on a mask object.

Signature:

create_gray_value_analysis_mask(analysisName: str, maskName: str, volumeName: str, params: GrayValueParams = GrayValueParams()) -> str

Parameters:

ParameterTypeDescription
analysisNamestrName for the new analysis object. If empty, a name is auto-generated.
maskNamestrName of the mask object to analyze.
volumeNamestrName of the volume object providing gray values.
paramsGrayValueParamsGray value analysis parameters. Use api.GrayValueParams().

Returns: str — The name of the created analysis object.


create_gray_value_analysis_surface​

Creates a gray value analysis on a surface object.

Signature:

create_gray_value_analysis_surface(analysisName: str, surfaceName: str, volumeName: str, params: GrayValueParams = GrayValueParams()) -> str

Parameters:

ParameterTypeDescription
analysisNamestrName for the new analysis object. If empty, a name is auto-generated.
surfaceNamestrName of the surface object to analyze.
volumeNamestrName of the volume object providing gray values.
paramsGrayValueParamsGray value analysis parameters. Use api.GrayValueParams().

Returns: str — The name of the created analysis object.


create_void_inclusion_analysis​

Creates a void/inclusion analysis on a volume object.

Signature:

create_void_inclusion_analysis(analysisName: str, volumeName: str, roiMaskName: str, params: VoidInclusionParams) -> str

Parameters:

ParameterTypeDescription
analysisNamestrName for the new analysis object. If empty, a name is auto-generated.
volumeNamestrName of the volume object to analyze.
roiMaskNamestrOptional ROI mask name to restrict analysis region. Pass empty string if not used.
paramsVoidInclusionParamsVoid/inclusion analysis parameters. Use api.VoidInclusionParams().

Returns: str — The name of the created analysis object.


Properties​

run_analysis​

Runs the specified analysis and computes results.

Signature:

run_analysis(analysisName: str) -> bool

Parameters:

ParameterTypeDescription
analysisNamestrName of the analysis object to run.

Returns: bool — True if the analysis completed successfully.


update_analysis​

Updates the visualization of an existing analysis.

Signature:

update_analysis(analysisName: str) -> None

Parameters:

ParameterTypeDescription
analysisNamestrName of the analysis object to update.

get_analysis_info​

Gets information about an analysis object.

Signature:

get_analysis_info(analysisName: str) -> AnalysisInfo

Parameters:

ParameterTypeDescription
analysisNamestrName of the analysis object.

Returns: AnalysisInfo — Analysis information structure as a api.AnalysisInfo structure.


get_analysis_type​

Gets the type of an analysis object.

Signature:

get_analysis_type(analysisName: str) -> AnalysisType

Parameters:

ParameterTypeDescription
analysisNamestrName of the analysis object.

Returns: AnalysisType — The analysis type as a api.AnalysisType enum value.


get_analysis_type_as_string​

Gets the type of an analysis object as a string.

Signature:

get_analysis_type_as_string(analysisName: str) -> str

Parameters:

ParameterTypeDescription
analysisNamestrName of the analysis object.

Returns: str — The analysis type as a string.


has_analysis_results​

Checks if an analysis has computed results.

Signature:

has_analysis_results(analysisName: str) -> bool

Parameters:

ParameterTypeDescription
analysisNamestrName of the analysis object.

Returns: bool — True if the analysis has results available.


get_wall_thickness_analysis_results​

Gets detailed results for a wall thickness analysis (mask or surface based).

Signature:

get_wall_thickness_analysis_results(analysisName: str) -> WallThicknessAnalysisResults

Parameters:

ParameterTypeDescription
analysisNamestrName of the analysis object.

Returns: WallThicknessAnalysisResults — Wall thickness analysis results as an api.WallThicknessAnalysisResults structure which includes statistics and raw samples.


get_deviation_analysis_results​

Gets detailed results for a deviation analysis (mask vs mask, surface vs surface, mask vs surface). Per-vertex samples contain exact closest points and their represented surface area. Aggregate mean and standard deviation use those sample weights.

Signature:

get_deviation_analysis_results(analysisName: str) -> DeviationAnalysisResults

Parameters:

ParameterTypeDescription
analysisNamestrName of the analysis object.

Returns: DeviationAnalysisResults — Deviation analysis results as an api.DeviationAnalysisResults structure which includes statistics and raw samples.


get_curvature_analysis_results​

Gets detailed results for a curvature analysis (mask or surface based).

Signature:

get_curvature_analysis_results(analysisName: str) -> CurvatureAnalysisResults

Parameters:

ParameterTypeDescription
analysisNamestrName of the analysis object.

Returns: CurvatureAnalysisResults — Curvature analysis results as an api.CurvatureAnalysisResults structure which includes statistics and raw samples.


get_extrema_analysis_results​

Gets detailed results for an extrema analysis (mask or surface based).

Signature:

get_extrema_analysis_results(analysisName: str) -> ExtremaAnalysisResults

Parameters:

ParameterTypeDescription
analysisNamestrName of the analysis object.

Returns: ExtremaAnalysisResults — Extrema analysis results as an api.ExtremaAnalysisResults structure which includes statistics and raw samples.


get_gray_value_analysis_results​

Gets detailed results for a gray value analysis (mask or surface based).

Signature:

get_gray_value_analysis_results(analysisName: str) -> GrayValueAnalysisResults

Parameters:

ParameterTypeDescription
analysisNamestrName of the analysis object.

Returns: GrayValueAnalysisResults — Gray value analysis results as an api.GrayValueAnalysisResults structure which includes statistics and raw samples.


get_void_inclusion_results​

Gets results from a void/inclusion analysis.

Signature:

get_void_inclusion_results(analysisName: str) -> VoidInclusionResults

Parameters:

ParameterTypeDescription
analysisNamestrName of the analysis object.

Returns: VoidInclusionResults — Void/inclusion analysis results as an api.VoidInclusionResults structure. If the analysis has not yet generated a result mask, only resultMaskName and requestedStatistics are set; the per-label, descriptive, whole-mask statistics and volume summary fields remain at their default values.


restore_visualizations​

Restores the visualizations in 2D/3D views for a given analysis. This clears the analysis visualization, including color mapping and preview geometry.

Signature:

restore_visualizations(analysisName: str) -> None

Parameters:

ParameterTypeDescription
analysisNamestrName of the analysis object.

write_wall_thickness_results_to_disk​

Writes wall thickness analysis results to disk in a human-readable text format. Sample values outside the selected range are written as -inf or +inf. Invalid negative samples are written as n/a.

Signature:

write_wall_thickness_results_to_disk(results: WallThicknessAnalysisResults, filePath: str) -> None

Parameters:

ParameterTypeDescription
resultsWallThicknessAnalysisResultsPreviously computed wall thickness results api.WallThicknessAnalysisResults to write.
filePathstrDestination file path.

write_deviation_results_to_disk​

Writes deviation analysis results to disk in a human-readable text format. Sample values outside the selected range are written as -inf or +inf.

Signature:

write_deviation_results_to_disk(results: DeviationAnalysisResults, filePath: str) -> None

Parameters:

ParameterTypeDescription
resultsDeviationAnalysisResultsPreviously computed deviation results api.DeviationAnalysisResults to write.
filePathstrDestination file path.

write_curvature_results_to_disk​

Writes curvature analysis results to disk in a human-readable text format. Sample values outside the selected range are written as -inf or +inf.

Signature:

write_curvature_results_to_disk(results: CurvatureAnalysisResults, filePath: str) -> None

Parameters:

ParameterTypeDescription
resultsCurvatureAnalysisResultsPreviously computed curvature results api.CurvatureAnalysisResults to write.
filePathstrDestination file path.

write_extrema_results_to_disk​

Writes extrema analysis results to disk in a human-readable text format. Sample values outside the selected range are written as -inf or +inf.

Signature:

write_extrema_results_to_disk(results: ExtremaAnalysisResults, filePath: str) -> None

Parameters:

ParameterTypeDescription
resultsExtremaAnalysisResultsPreviously computed extrema results api.ExtremaAnalysisResults to write.
filePathstrDestination file path.

write_gray_value_results_to_disk​

Writes gray value analysis results to disk in a human-readable text format. Sample values outside the selected range are written as -inf or +inf.

Signature:

write_gray_value_results_to_disk(results: GrayValueAnalysisResults, filePath: str) -> None

Parameters:

ParameterTypeDescription
resultsGrayValueAnalysisResultsPreviously computed gray value results api.GrayValueAnalysisResults to write.
filePathstrDestination file path.

write_void_inclusion_results_to_disk​

Writes void/inclusion analysis results to disk in a human-readable text format.

Signature:

write_void_inclusion_results_to_disk(results: VoidInclusionResults, filePath: str) -> None

Parameters:

ParameterTypeDescription
resultsVoidInclusionResultsPreviously computed void/inclusion results api.VoidInclusionResults to write.
filePathstrDestination file path.

UI​

set_display_settings​

Sets the display settings for an analysis.

Signature:

set_display_settings(analysisName: str, settings: AnalysisDisplaySettings) -> None

Parameters:

ParameterTypeDescription
analysisNamestrName of the analysis object.
settingsAnalysisDisplaySettingsDisplay settings structure. Create using api.AnalysisDisplaySettings().

get_display_settings​

Gets the current display settings for an analysis.

Signature:

get_display_settings(analysisName: str) -> AnalysisDisplaySettings

Parameters:

ParameterTypeDescription
analysisNamestrName of the analysis object.

Returns: AnalysisDisplaySettings — Current display settings as an api.AnalysisDisplaySettings structure.


See Also​