mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-13 03:47:40 +02:00
121 lines
3.6 KiB
XML
121 lines
3.6 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="300"
|
|
x:Class="UVtools.WPF.Controls.KernelControl">
|
|
|
|
<Grid RowDefinitions="Auto" ColumnDefinitions="*,10,Auto">
|
|
<TextBox
|
|
ToolTip.Tip="The kernel or structuring element used to probe the input image.
|
|

A structuring element is a matrix that identifies the pixel in the image being processed and defines the neighborhood used in the processing of each pixel."
|
|
VerticalAlignment="Stretch"
|
|
AcceptsReturn="True"
|
|
Watermark="Kernel matrix"
|
|
UseFloatingWatermark="True"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
Text="{Binding MatrixText}"
|
|
/>
|
|
|
|
<Grid
|
|
Grid.Column="2"
|
|
RowDefinitions="Auto,10,Auto,10,Auto,20,Auto"
|
|
ColumnDefinitions="Auto,10,Auto,10,Auto,10,Auto">
|
|
|
|
<TextBlock
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Text="Shape:"/>
|
|
<ComboBox
|
|
Grid.ColumnSpan="5"
|
|
Grid.Column="2"
|
|
SelectedItem="{Binding SelectedKernelShape}"
|
|
Items="{Binding KernelShapes}"
|
|
/>
|
|
|
|
<TextBlock
|
|
Grid.Column="0"
|
|
Grid.Row="2"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Text="Size:"/>
|
|
<NumericUpDown
|
|
Grid.Column="2"
|
|
Grid.Row="2"
|
|
VerticalAlignment="Center"
|
|
Minimum="2"
|
|
MinWidth="60"
|
|
Value="{Binding MatrixWidth}"
|
|
/>
|
|
<TextBlock
|
|
Grid.Column="4"
|
|
Grid.Row="2"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Text="x"/>
|
|
<NumericUpDown
|
|
Grid.Column="6"
|
|
Grid.Row="2"
|
|
VerticalAlignment="Center"
|
|
Minimum="2"
|
|
MinWidth="60"
|
|
Value="{Binding MatrixHeight}"
|
|
/>
|
|
|
|
|
|
<TextBlock
|
|
Grid.Column="0"
|
|
Grid.Row="4"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Text="Anchor X:"/>
|
|
<NumericUpDown
|
|
Grid.Column="2"
|
|
Grid.Row="4"
|
|
VerticalAlignment="Center"
|
|
Minimum="-1"
|
|
MinWidth="60"
|
|
ToolTip.Tip="X coordinate of the kenel origin, -1 for auto-center."
|
|
Value="{Binding AnchorX}"
|
|
/>
|
|
<TextBlock
|
|
Grid.Column="4"
|
|
Grid.Row="4"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Text="Y:"/>
|
|
<NumericUpDown
|
|
Grid.Column="6"
|
|
Grid.Row="4"
|
|
VerticalAlignment="Center"
|
|
Minimum="-1"
|
|
MinWidth="60"
|
|
ToolTip.Tip="Y coordinate of the kernel origin, -1 for auto-center."
|
|
Value="{Binding AnchorY}"
|
|
/>
|
|
|
|
<Button
|
|
Grid.Column="0"
|
|
Grid.Row="6"
|
|
Grid.ColumnSpan="3"
|
|
Padding="10"
|
|
Content="Generate"
|
|
Command="{Binding GenerateKernel}"
|
|
/>
|
|
|
|
<Button
|
|
Grid.Column="4"
|
|
Grid.Row="6"
|
|
Grid.ColumnSpan="3"
|
|
Padding="10"
|
|
Content="Reset"
|
|
Command="{Binding ResetKernel}"
|
|
/>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</UserControl>
|