添加气泡检测界面图标
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 442 B |
Binary file not shown.
|
After Width: | Height: | Size: 609 B |
Binary file not shown.
|
After Width: | Height: | Size: 697 B |
Binary file not shown.
|
After Width: | Height: | Size: 516 B |
Binary file not shown.
|
After Width: | Height: | Size: 209 B |
@@ -43,14 +43,22 @@
|
||||
<!-- 工具选择 -->
|
||||
<TextBlock Text="工具" FontWeight="SemiBold" Margin="0,0,0,4" />
|
||||
<WrapPanel>
|
||||
<RadioButton x:Name="RbRoi" Content="ROI" IsChecked="True" Margin="0,0,4,4"
|
||||
Style="{StaticResource ToolToggleStyle}" />
|
||||
<RadioButton x:Name="RbWand" Content="魔棒" Margin="0,0,4,4"
|
||||
Style="{StaticResource ToolToggleStyle}" />
|
||||
<RadioButton x:Name="RbBrush" Content="画笔" Margin="0,0,4,4"
|
||||
Style="{StaticResource ToolToggleStyle}" />
|
||||
<RadioButton x:Name="RbEraser" Content="橡皮擦" Margin="0,0,0,4"
|
||||
Style="{StaticResource ToolToggleStyle}" />
|
||||
<RadioButton x:Name="RbRoi" IsChecked="True" Margin="0,0,4,4"
|
||||
ToolTip="ROI" Style="{StaticResource ToolToggleStyle}">
|
||||
<Image Source="/Assets/Icons/rectangle32.png" Width="20" Height="20" />
|
||||
</RadioButton>
|
||||
<RadioButton x:Name="RbWand" Margin="0,0,4,4"
|
||||
ToolTip="魔棒" Style="{StaticResource ToolToggleStyle}">
|
||||
<Image Source="/Assets/Icons/magic32.png" Width="20" Height="20" />
|
||||
</RadioButton>
|
||||
<RadioButton x:Name="RbBrush" Margin="0,0,4,4"
|
||||
ToolTip="画笔" Style="{StaticResource ToolToggleStyle}">
|
||||
<Image Source="/Assets/Icons/brush32.png" Width="20" Height="20" />
|
||||
</RadioButton>
|
||||
<RadioButton x:Name="RbEraser" Margin="0,0,0,4"
|
||||
ToolTip="橡皮擦" Style="{StaticResource ToolToggleStyle}">
|
||||
<Image Source="/Assets/Icons/eraser32.png" Width="20" Height="20" />
|
||||
</RadioButton>
|
||||
</WrapPanel>
|
||||
|
||||
<Separator Margin="0,6" />
|
||||
@@ -58,9 +66,9 @@
|
||||
<!-- 阈值 -->
|
||||
<TextBlock Text="灰度阈值(与点击点的最大灰度差)" Margin="0,0,0,4" FontSize="11" Foreground="Gray" />
|
||||
<DockPanel>
|
||||
<TextBox x:Name="TbThreshold" DockPanel.Dock="Right" Width="45" Text="128"
|
||||
<TextBox x:Name="TbThreshold" DockPanel.Dock="Right" Width="45" Text="30"
|
||||
VerticalContentAlignment="Center" Margin="6,0,0,0" />
|
||||
<Slider x:Name="SliderThreshold" Minimum="0" Maximum="255" Value="128"
|
||||
<Slider x:Name="SliderThreshold" Minimum="0" Maximum="60" Value="30"
|
||||
VerticalAlignment="Center" />
|
||||
</DockPanel>
|
||||
|
||||
@@ -86,9 +94,13 @@
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<WrapPanel HorizontalAlignment="Center">
|
||||
<Button Content="撤销" Padding="12,4" Margin="0,0,8,0" Click="Undo_Click" />
|
||||
<Button Content="清除标记" Padding="12,4" Margin="0,0,8,0" Click="ClearMask_Click" />
|
||||
<Button Content="完成" Padding="12,4" Click="Finish_Click" />
|
||||
<Button Padding="8,4" Margin="0,0,8,0" ToolTip="撤销" Click="Undo_Click">
|
||||
<Image Source="/Assets/Icons/Undo.png" Width="20" Height="20" />
|
||||
</Button>
|
||||
<Button Padding="8,4" Margin="0,0,8,0" ToolTip="清除标记" Click="ClearMask_Click">
|
||||
<Image Source="/Assets/Icons/Clear.png" Width="20" Height="20" />
|
||||
</Button>
|
||||
<Button Content="OK" Padding="12,4" Click="Finish_Click" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</Window>
|
||||
|
||||
@@ -48,6 +48,19 @@ namespace XplorePlane.Views.ImageProcessing
|
||||
_canvas?.SetBubbleBrushSize((int)SliderBrushSize.Value);
|
||||
};
|
||||
|
||||
// VoidLimit 同步
|
||||
TbVoidLimit.TextChanged += (s, ev) =>
|
||||
{
|
||||
if (double.TryParse(TbVoidLimit.Text, out double val))
|
||||
_canvas?.SetBubbleVoidLimit(System.Math.Clamp(val, 0, 100));
|
||||
};
|
||||
|
||||
// 初始同步:确保面板默认值推送到 canvas
|
||||
_canvas?.SetBubbleThreshold((int)SliderThreshold.Value);
|
||||
_canvas?.SetBubbleBrushSize((int)SliderBrushSize.Value);
|
||||
if (double.TryParse(TbVoidLimit.Text, out double initLimit))
|
||||
_canvas?.SetBubbleVoidLimit(System.Math.Clamp(initLimit, 0, 100));
|
||||
|
||||
// 监听 canvas 的工具切换事件(ROI 画完后自动切换时同步面板)
|
||||
if (_canvas != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user