diff --git a/src/gui/core/panel_registry.py b/src/gui/core/panel_registry.py index dfa6ed6..010574c 100644 --- a/src/gui/core/panel_registry.py +++ b/src/gui/core/panel_registry.py @@ -48,9 +48,14 @@ PANEL_REGISTRY = [ 'icon': '2.png', 'stage': '阶段一:影像预处理', 'display_name': '2. 耀斑区域识别', + # 对账修复(2026-06-18): + # - img_path: 来源 step1.img_file、目标 step2.img_file ✓ 两端均存在 + # - water_mask_path: 原 panel_attr='water_mask_file' 在 step1 panel 不存在(断链) + # → 改为 step1 真实控件名 'mask_file'(step1 默认现有掩膜输入模式) + # → NDWI 模式由 step2.update_from_config 自补足,不依赖 EventBus 链路 'dependencies': { 'img_path': ('step1', 'reference_img', 'img_file'), - 'water_mask_path': ('step1', 'water_mask', 'water_mask_file'), + 'water_mask_path': ('step1', 'water_mask', 'mask_file'), }, 'constructor_kwargs': None, }, @@ -61,9 +66,14 @@ PANEL_REGISTRY = [ 'icon': '3.png', 'stage': '阶段一:影像预处理', 'display_name': '3. 耀斑去除与修复', + # 对账修复(2026-06-18): + # - img_path: 来源 step1.img_file、目标 step3.img_file ✓ 两端均存在 + # - water_mask: 原 panel_attr='water_mask_file' 在 step1 panel 不存在(断链) + # → 改为 step1 真实控件名 'mask_file' + # → NDWI 模式由 step3.update_from_config 自补足 'dependencies': { 'img_path': ('step1', 'reference_img', 'img_file'), - 'water_mask': ('step1', 'water_mask', 'water_mask_file'), + 'water_mask': ('step1', 'water_mask', 'mask_file'), }, 'constructor_kwargs': None, }, @@ -78,9 +88,14 @@ PANEL_REGISTRY = [ 'icon': '4.png', 'stage': '阶段二:样本数据准备', 'display_name': '4. 采样点布设', + # 对账修复(2026-06-18): + # - deglint_img_path: 原 panel_attr='deglint_img_file' 在 step3 panel 不存在(断链) + # → step3 输出 widget 真实名为 'output_file'(deglint_image.bsq) + # - water_mask_path: 原 'water_mask_file' 在 step1 panel 不存在 + # → 改为 step1 真实控件名 'mask_file' 'dependencies': { - 'deglint_img_path': ('step3', 'deglint_image', 'deglint_img_file'), - 'water_mask_path': ('step1', 'water_mask', 'water_mask_file'), + 'deglint_img_path': ('step3', 'deglint_image', 'output_file'), + 'water_mask_path': ('step1', 'water_mask', 'mask_file'), }, 'constructor_kwargs': None, }, @@ -102,10 +117,17 @@ PANEL_REGISTRY = [ 'icon': '6.png', 'stage': '阶段二:样本数据准备', 'display_name': '6. 光谱特征提取', + # 对账修复(2026-06-18): + # - deglint_img_path: 原 'deglint_img_file' 在 step3 panel 不存在(断链) + # → 改为 step3 输出 widget 'output_file' + # - csv_path: 原 'csv_file' ✓ step5 panel 有 self.csv_file,无修改 + # - boundary_mask_path: 原 'water_mask_file' 在 step1 panel 不存在 + # → 改为 step1 真实控件名 'mask_file' + # - glint_mask_path: 原 'glint_mask_file' ✓ step2 panel 有,无修改 'dependencies': { - 'deglint_img_path': ('step3', 'deglint_image', 'deglint_img_file'), + 'deglint_img_path': ('step3', 'deglint_image', 'output_file'), 'csv_path': ('step5_clean', 'processed_data', 'csv_file'), - 'boundary_mask_path': ('step1', 'water_mask', 'water_mask_file'), + 'boundary_mask_path': ('step1', 'water_mask', 'mask_file'), 'glint_mask_path': ('step2', 'glint_mask', 'glint_mask_file'), }, 'constructor_kwargs': None, @@ -117,8 +139,18 @@ PANEL_REGISTRY = [ 'icon': '7.png', 'stage': '阶段二:样本数据准备', 'display_name': '7. 水质指数计算', + # 对账修复(2026-06-18): + # - training_csv_path: + # 原 ('step6_feature', 'training_spectra', 'training_data_widget') + # output_type='training_spectra' 仅作为 EventBus 事件标签,不匹配 step6 输出 + # panel_attr='training_data_widget' 已是 step7 view 真实控件 ✓ + # 改 output_type='output_file'(step6 输出 file widget 名为 output_file) + # ⚠️ 用户原文要求 panel_attr='csv_file',但 step7 无 csv_file widget + # (只有 training_data_widget 与 formula_csv_widget), + # 实际改用 step7 真实控件 'training_data_widget', + # source panel_attr 取 step6 的 'output_file'(双源对账一致) 'dependencies': { - 'training_csv_path': ('step6_feature', 'training_spectra', 'training_data_widget'), + 'training_csv_path': ('step6_feature', 'output_file', 'training_data_widget'), }, 'constructor_kwargs': None, }, @@ -133,8 +165,14 @@ PANEL_REGISTRY = [ 'icon': '8.png', 'stage': '阶段三:模型构建与训练', 'display_name': '8. 机器学习建模', + # 对账修复(2026-06-18): + # - training_csv_file: + # 原 ('step7_index', 'training_spectra_indices', 'training_csv_file') + # source panel_attr='training_csv_file' 在 step7 view 不存在(断链) + # → step7 view 输出(指数计算后 CSV)真实控件为 'training_data_widget' + # target panel_attr='training_csv_file' ✓ step8 panel 有 self.training_csv_file 'dependencies': { - 'training_csv_file': ('step7_index', 'training_spectra_indices', 'training_csv_file'), + 'training_csv_file': ('step7_index', 'training_spectra_indices', 'training_data_widget'), }, 'constructor_kwargs': None, }, @@ -149,8 +187,14 @@ PANEL_REGISTRY = [ 'icon': '10.png', 'stage': '阶段四:预测与成果输出', 'display_name': '9. 机器学习预测', + # 对账修复(2026-06-18): + # - models_dir: + # 原 ('step8_ml_train', 'Supervised_Model_Training', 'models_dir_file') + # source panel_attr='models_dir_file' 在 step8 panel 不存在(断链) + # → step8 模型输出真实控件为 'output_path' + # target panel_attr='models_dir_file' ✓ step9 panel 有 self.models_dir_file 'dependencies': { - 'models_dir': ('step8_ml_train', 'Supervised_Model_Training', 'models_dir_file'), + 'models_dir': ('step8_ml_train', 'Supervised_Model_Training', 'output_path'), }, 'constructor_kwargs': None, }, @@ -161,8 +205,14 @@ PANEL_REGISTRY = [ 'icon': '10.png', 'stage': '阶段四:预测与成果输出', 'display_name': '10. 水色指数反演', + # 对账修复(2026-06-18): + # - bsq_file: + # 原 ('step3', 'deglint_image', 'bsq_file') + # source panel_attr='bsq_file' 在 step3 panel 不存在(断链) + # → step3 输出(deglint_image.bsq)真实控件为 'output_file' + # target panel_attr='bsq_file' ✓ step10 panel 有 self.bsq_file 'dependencies': { - 'bsq_file': ('step3', 'deglint_image', 'bsq_file'), + 'bsq_file': ('step3', 'deglint_image', 'output_file'), }, 'constructor_kwargs': None, }, @@ -173,9 +223,21 @@ PANEL_REGISTRY = [ 'icon': '10.png', 'stage': '阶段四:预测与成果输出', 'display_name': '11. 专题图生成', + # 对账修复(2026-06-18): + # - prediction_csv_dir_edit: + # 原 ('step9_ml_predict', '9_ML_Prediction', 'prediction_csv_dir_edit') + # source panel_attr='prediction_csv_dir_edit' 在 step9 panel 不存在(断链) + # → step9 输出(prediction.csv)真实控件为 'output_file' + # target panel_attr='prediction_csv_dir_edit' ✓ step11 panel 有该 widget + # ⚠️ 语义注记:target 是「目录」(QLineEdit)但 source 是「单文件」,下游需手动指定目录 + # - geotiff_dir_edit: + # 原 ('step10_watercolor', 'WaterIndex_Images', 'geotiff_dir_edit') + # source panel_attr='geotiff_dir_edit' 在 step10 panel 不存在(断链) + # → step10 输出(GeoTIFF 目录)真实控件为 'output_dir' + # target panel_attr='geotiff_dir_edit' ✓ step11 panel 有该 widget 'dependencies': { - 'prediction_csv_dir_edit': ('step9_ml_predict', '9_ML_Prediction', 'prediction_csv_dir_edit'), - 'geotiff_dir_edit': ('step10_watercolor', 'WaterIndex_Images', 'geotiff_dir_edit'), + 'prediction_csv_dir_edit': ('step9_ml_predict', '9_ML_Prediction', 'output_file'), + 'geotiff_dir_edit': ('step10_watercolor', 'WaterIndex_Images', 'output_dir'), }, 'constructor_kwargs': None, },