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 ------- .. py:class:: DicomInfo DICOM study/volume information for an optimization run. **Methods:** .. py:method:: from_dict() Create from dictionary. .. py:class:: TrialData Data for a single optimization trial. .. py:class:: OptimizationRun Data for a complete optimization run. **Methods:** .. py:method:: get_trial() Get trial by number. .. py:method:: get_algorithm_trials() Get all trials for a specific algorithm. .. py:class:: ResultsLoader Load optimization run results. Scans the optimization_results directory and loads run data including trials, metrics, and segmentations. **Methods:** .. py:method:: __init__() Initialize loader. .. py:method:: list_runs() List available optimization runs. .. py:method:: load() Load complete optimization run. .. py:method:: get_gold_standard_path() Get gold standard path from run config. Functions --------- .. py:function:: from_dict() Create from dictionary. .. py:function:: get_trial() Get trial by number. .. py:function:: get_algorithm_trials() Get all trials for a specific algorithm. .. py:function:: list_runs() List available optimization runs. Returns: List of paths to run directories, sorted by date descending. .. py:function:: 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. .. py:function:: 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.