VisualizationController ======================= Dual segmentation visualization controller. Manages display of gold standard and test segmentations with different view modes and color schemes. Gold standards: Loaded from .seg.nrrd (primary) or DICOM cache (for CSE) Test segmentations: Loaded from DICOM SEG (optimization output format) Classes ------- .. py:class:: VisualizationController Control dual segmentation visualization. Displays gold standard (yellow/gold) and test (cyan) segmentations with various view modes: outline, transparent, fill. Gold standards are loaded from .seg.nrrd files (git-tracked canonical format). Test segmentations are loaded from DICOM SEG (optimization output format). **Methods:** .. py:method:: __init__() Initialize controller. .. py:method:: load_gold_segmentation() Load gold standard segmentation from .seg.nrrd file. .. py:method:: load_gold_from_dicom_cache() Load gold standard from DICOM cache. .. py:method:: load_test_segmentation_from_dicom() Load trial segmentation from DICOM SEG file. .. py:method:: set_view_mode() Change display mode for both segmentations. .. py:method:: toggle_gold() Toggle gold standard visibility. .. py:method:: toggle_test() Toggle test segmentation visibility. .. py:method:: cleanup() Clean up loaded segmentations. .. py:method:: get_gold_node() Get gold standard segmentation node. .. py:method:: get_test_node() Get test segmentation node. Functions --------- .. py:function:: load_gold_segmentation() Load gold standard segmentation from .seg.nrrd file. This is the primary method for loading gold standards. Gold standards are stored as .seg.nrrd in git for version tracking. Args: path: Path to .seg.nrrd segmentation file. Returns: True if loaded successfully. .. py:function:: load_gold_from_dicom_cache() Load gold standard from DICOM cache. Used for CrossSegmentationExplorer compatibility when DICOM format is needed. The DICOM cache is generated on-demand from .seg.nrrd. Requires QuantitativeReporting extension for DICOMSegmentationPlugin. Args: dicom_seg_path: Path to DICOM SEG directory or file in .dicom_cache/. Returns: True if loaded successfully. .. py:function:: load_test_segmentation_from_dicom() Load trial segmentation from DICOM SEG file. Test segmentations from optimization runs are stored as DICOM SEG. Requires QuantitativeReporting extension for DICOMSegmentationPlugin. Args: dicom_seg_path: Path to DICOM SEG directory or file. Returns: True if loaded successfully. .. py:function:: set_view_mode() Change display mode for both segmentations. Args: mode: View mode - "outline", "transparent", or "fill". .. py:function:: toggle_gold() Toggle gold standard visibility. Args: visible: Whether to show gold standard. .. py:function:: toggle_test() Toggle test segmentation visibility. Args: visible: Whether to show test segmentation. .. py:function:: cleanup() Clean up loaded segmentations. .. py:function:: get_gold_node() Get gold standard segmentation node. .. py:function:: get_test_node() Get test segmentation node.