ResultsLoader
Load and parse optimization run results.
Loads results from the optimization_results directory structure. All segmentations are stored as DICOM SEG (no .seg.nrrd support).
Classes
- class DicomInfo
DICOM study/volume information for an optimization run.
Methods:
- from_dict()
Create from dictionary.
- class TrialData
Data for a single optimization trial.
- class OptimizationRun
Data for a complete optimization run.
Methods:
- get_trial()
Get trial by number.
- get_algorithm_trials()
Get all trials for a specific algorithm.
- class ResultsLoader
Load optimization run results.
Scans the optimization_results directory and loads run data including trials, metrics, and segmentations.
Methods:
- __init__()
Initialize loader.
- list_runs()
List available optimization runs.
- load()
Load complete optimization run.
- get_gold_standard_path()
Get gold standard path from run config.
Functions
- from_dict()
Create from dictionary.
- get_trial()
Get trial by number.
- get_algorithm_trials()
Get all trials for a specific algorithm.
- list_runs()
List available optimization runs.
- Returns:
List of paths to run directories, sorted by date descending.
- load()
Load complete optimization run.
- Args:
run_path: Path to run directory.
- Returns:
OptimizationRun with all data.
- Raises:
FileNotFoundError: If results file doesn’t exist.
- get_gold_standard_path()
Get gold standard path from run config.
Supports both .seg.nrrd (preferred) and DICOM formats.
- Args:
run: Optimization run.
- Returns:
Tuple of (path, format) where format is “nrrd” or “dicom”, or (None, “”) if not found.