diff --git a/XplorePlane/Events/MeasurementToolEvent.cs b/XplorePlane/Events/MeasurementToolEvent.cs
index 9964acb..4356e45 100644
--- a/XplorePlane/Events/MeasurementToolEvent.cs
+++ b/XplorePlane/Events/MeasurementToolEvent.cs
@@ -30,4 +30,25 @@ namespace XplorePlane.Events
/// 行灰度分布切换事件
///
public class ToggleLineProfileEvent : PubSubEvent { }
+
+ ///
+ /// 白底检测事件(进入ROI绘制模式)
+ ///
+ public class WhiteBackgroundDetectionEvent : PubSubEvent { }
+
+ ///
+ /// 白底检测ROI绘制完成事件
+ ///
+ public class WhiteBackgroundRoiDrawnEvent : PubSubEvent { }
+
+ ///
+ /// 白底检测结果事件
+ ///
+ public class WhiteBackgroundResultEvent : PubSubEvent { }
+
+ public class WhiteBackgroundResultPayload
+ {
+ public System.Drawing.Rectangle RoiRect { get; set; }
+ public System.Collections.Generic.List<(System.Drawing.Point center, int radius, double sizeMm)> Detections { get; set; }
+ }
}
diff --git a/XplorePlane/ViewModels/Main/MainViewModel.cs b/XplorePlane/ViewModels/Main/MainViewModel.cs
index 151e895..6f99e44 100644
--- a/XplorePlane/ViewModels/Main/MainViewModel.cs
+++ b/XplorePlane/ViewModels/Main/MainViewModel.cs
@@ -275,6 +275,9 @@ namespace XplorePlane.ViewModels
_eventAggregator.GetEvent()
.Subscribe(OnPipelinePreviewUpdated, ThreadOption.UIThread);
+ _eventAggregator.GetEvent()
+ .Subscribe(OnWhiteBackgroundRoiDrawn, ThreadOption.UIThread);
+
NavigationTree = new ObservableCollection