WizardDataStructures
Data structures for the Parameter Wizard.
This module contains dataclasses used to collect and represent samples, analysis results, and recommendations during the Quick Select Parameters wizard workflow.
Classes
- class WizardSamples
Collected samples from wizard interaction.
Stores foreground, background, and boundary samples collected during the wizard’s interactive sampling phases.
Methods:
- has_foreground()
Check if foreground samples have been collected.
- has_background()
Check if background samples have been collected.
- has_boundary()
Check if boundary samples have been collected.
- foreground_count()
Return the number of foreground samples.
- background_count()
Return the number of background samples.
- clear_foreground()
Clear all foreground samples.
- clear_background()
Clear all background samples.
- clear_boundary()
Clear all boundary samples.
- clear_all()
Clear all samples.
- class IntensityAnalysisResult
Results from intensity distribution analysis.
Contains statistics about foreground and background intensity distributions and measures of their separation.
Methods:
- threshold_range()
Return the threshold range width.
- is_well_separated()
Check if foreground and background are well-separated.
- class ShapeAnalysisResult
Results from shape and boundary analysis.
Contains metrics about the structure’s size, shape, and boundary characteristics.
Methods:
- is_small_structure()
Check if structure is small.
- is_large_structure()
Check if structure is large.
- has_smooth_boundary()
Check if structure has a smooth boundary.
- class WizardRecommendation
Final wizard recommendation with explanations.
Contains the recommended algorithm and parameters along with reasoning for each choice.
Methods:
- is_high_confidence()
Check if recommendation has high confidence.
- has_warnings()
Check if recommendation has any warnings.
- has_threshold_suggestion()
Check if threshold values are suggested.
Functions
- has_foreground()
Check if foreground samples have been collected.
- has_background()
Check if background samples have been collected.
- has_boundary()
Check if boundary samples have been collected.
- foreground_count()
Return the number of foreground samples.
- background_count()
Return the number of background samples.
- clear_foreground()
Clear all foreground samples.
- clear_background()
Clear all background samples.
- clear_boundary()
Clear all boundary samples.
- clear_all()
Clear all samples.
- threshold_range()
Return the threshold range width.
- is_well_separated()
Check if foreground and background are well-separated.
- Args:
threshold: Separation score threshold for “well-separated” (default 0.7).
- Returns:
True if separation_score >= threshold.
- is_small_structure()
Check if structure is small.
- Args:
threshold_mm: Diameter threshold in mm (default 10.0).
- Returns:
True if diameter < threshold.
- is_large_structure()
Check if structure is large.
- Args:
threshold_mm: Diameter threshold in mm (default 50.0).
- Returns:
True if diameter > threshold.
- has_smooth_boundary()
Check if structure has a smooth boundary.
- Args:
threshold: Roughness threshold (default 0.3).
- Returns:
True if boundary_roughness <= threshold.
- is_high_confidence()
Check if recommendation has high confidence.
- Args:
threshold: Confidence threshold (default 0.75).
- Returns:
True if confidence >= threshold.
- has_warnings()
Check if recommendation has any warnings.
- has_threshold_suggestion()
Check if threshold values are suggested.