-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
177 lines (141 loc) · 12.3 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:kinectScan"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="kinectScan.MainWindow"
xmlns:tk="clr-namespace:Microsoft.Kinect.Toolkit;assembly=Microsoft.Kinect.Toolkit"
Title="kinectScan" Height="870" Width="1028" Loaded="WindowLoaded" Closing="WindowClosing" Top="0" Left="0" Icon="Images/Kinect.ico">
<Window.Resources>
<ResourceDictionary Source="/KinectResources.xaml" />
</Window.Resources>
<Grid x:Name="LayoutGrid" Margin="0, 0, 0, 0">
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="700" />
<ColumnDefinition Width="30" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Rectangle Fill="{StaticResource SecondaryBrandBrush}" />
<Grid x:Name="CameraZone" Margin="0,0,0,0" TextBlock.FontFamily="{StaticResource KinectFont}" Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="270" />
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition Height="510" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="700" />
</Grid.ColumnDefinitions>
<!-- Depth Camera -->
<Rectangle Fill="{StaticResource MediumNeutralBrush}" Grid.Row="0" Height="240" Width="320" Margin="30,30,350,0" />
<Image Name="KinectDepthView" Grid.Row="0" Height="240" Width="320" Margin="30,30,350, 0"/>
<!-- Bilateral Camera-->
<Rectangle Fill="{StaticResource MediumNeutralBrush}" Grid.Row="0" Height="240" Width="320" Margin="350,30,30,0" />
<Image Name="KinectRGBView" Grid.Row="0" Height="240" Width="320" Margin="350,30,30,0"/>
<!-- Reconstruction Model -->
<Grid x:Name="Reconstruction_Grid" Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"/>
<ColumnDefinition/>
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="480"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Rectangle Fill="{StaticResource MediumNeutralBrush}" Grid.Row="3" Height="480" Width="640" Margin="30,0,30,30" />
<Canvas Name="KinectNormalView" Grid.Column="1" Height="480" Width="640" Margin="0,0,0,30" Background="{StaticResource MediumNeutralBrush}"/>
<!-- Bounding Box-->
<!-- <Border BorderBrush="Red" BorderThickness="1" Grid.Column="1" /> -->
</Grid>
<!-- Titles -->
<Label x:Name="IR_Title" Content="IR DEPTH CAMERA" Grid.Row="1" Foreground="White" HorizontalAlignment="Left" Margin="30,0,0,0" VerticalAlignment="Top"/>
<Label x:Name="RGB_Title" Content="RGB CAMERA" Grid.Row="1" Foreground="White" HorizontalAlignment="Right" Margin="0,0,30,0" VerticalAlignment="Top"/>
<Label x:Name="Model_Title" Content="RECONSTRUCTED MODEL" Grid.Row="2" Foreground="White" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Bottom"/>
<Label x:Name="statusBarText" Grid.Row="1" Foreground="White" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" Grid.RowSpan="2"/>
<Label x:Name="KinectStatusText" Content="Kinect Status: Loading..." Grid.Row="3" Foreground="White" HorizontalAlignment="Left" Margin="10,0,0,5" VerticalAlignment="Bottom"/>
</Grid>
<!--CameraZone-->
<Grid x:Name="MenuArea" Background="White" Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="90" />
<RowDefinition Height="240" />
<RowDefinition Height="50" />
<RowDefinition />
<RowDefinition Height="30" />
<RowDefinition Height="100" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="290" />
</Grid.ColumnDefinitions>
<Button x:Name ="Begin_Scan" Content="RECORD FRAME" Margin="0,30,0,0" Style="{StaticResource KinectButton}" Grid.Row="0" Click="Begin_Scan_Click"/>
<Button x:Name ="End_Scan" Content="CLEAR CANVAS" Margin="137,30,0,0" Style="{StaticResource KinectButton}" Grid.Row="0" Click="End_Scan_Click" />
<!--BeginSlider Area-->
<Grid x:Name="SliderArea" Background="White" Grid.Row="1" Margin="0,0,30,30" Grid.RowSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="40" />
<RowDefinition Height="40" />
<RowDefinition Height="40" />
<RowDefinition Height="40" />
<RowDefinition Height="40" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="220" />
<ColumnDefinition Width="40" />
</Grid.ColumnDefinitions>
<Label x:Name="Near_Filter_Title" Content="MIN FILTER DEPTH" Foreground="{StaticResource SecondaryBrandBrush}" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" />
<Slider x:Name="Near_Filter_Slider" HorizontalAlignment="Left" Margin="10,20,0,0" VerticalAlignment="Top" Width="200" Style="{StaticResource SliderStyle}" Grid.Row="0" Grid.Column="0" Minimum="0" Maximum="654" Value="0"/>
<Label x:Name="Near_Filter_Value" Content="{Binding ElementName=Near_Filter_Slider,Path=Value}" ContentStringFormat="{}{0:N0}" Grid.Row="0" Grid.Column="1" Foreground="{StaticResource SecondaryBrandBrush}" HorizontalAlignment="Left" VerticalAlignment="Center" />
<Label x:Name="Far_Filter_Title" Content="MAX FILTER DEPTH" Foreground="{StaticResource SecondaryBrandBrush}" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" Grid.Row="1" Grid.Column="0" />
<Slider x:Name="Far_Filter_Slider" HorizontalAlignment="Left" Margin="10,20,0,0" VerticalAlignment="Top" Width="200" Style="{StaticResource SliderStyle}" Grid.Row="1" Grid.Column="0" Minimum="{Binding ElementName=Near_Filter_Slider,Path=Value}" Maximum="654" Value="300"/>
<Label x:Name="Far_Filter_Value" Content="{Binding ElementName=Far_Filter_Slider,Path=Value}" ContentStringFormat="{}{0:N0}" Grid.Row="1" Grid.Column="1" Foreground="{StaticResource SecondaryBrandBrush}" HorizontalAlignment="Left" VerticalAlignment="Center" />
<Label x:Name="Left_Title" Content="LEFT BOUND" Foreground="{StaticResource SecondaryBrandBrush}" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" Grid.Row="2" Grid.Column="0" />
<Slider x:Name="Left_Slider" HorizontalAlignment="Left" Margin="10,20,0,0" VerticalAlignment="Top" Width="200" Style="{StaticResource SliderStyle}" Grid.Row="2" Grid.Column="0" Minimum="0" Maximum="320" Value="0"/>
<Label x:Name="Left_Value" Content="{Binding ElementName=Left_Slider,Path=Value}" ContentStringFormat="{}{0:N0}" Grid.Row="2" Grid.Column="1" Foreground="{StaticResource SecondaryBrandBrush}" HorizontalAlignment="Left" VerticalAlignment="Center" />
<Label x:Name="Right_Title" Content="RIGHT BOUND" Foreground="{StaticResource SecondaryBrandBrush}" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" Grid.Row="3" Grid.Column="0" />
<Slider x:Name="Right_Slider" HorizontalAlignment="Left" Margin="10,20,0,0" VerticalAlignment="Top" Width="200" Style="{StaticResource SliderStyle}" Grid.Row="3" Grid.Column="0" Minimum="0" Maximum="320" Value="320"/>
<Label x:Name="Right_Value" Content="{Binding ElementName=Right_Slider,Path=Value}" ContentStringFormat="{}{0:N0}" Grid.Row="3" Grid.Column="1" Foreground="{StaticResource SecondaryBrandBrush}" HorizontalAlignment="Left" VerticalAlignment="Center" />
<Label x:Name="Top_Title" Content="TOP BOUND" Foreground="{StaticResource SecondaryBrandBrush}" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" Grid.Row="4" Grid.Column="0" />
<Slider x:Name="Top_Slider" HorizontalAlignment="Left" Margin="10,20,0,0" VerticalAlignment="Top" Width="200" Style="{StaticResource SliderStyle}" Grid.Row="4" Grid.Column="0" Minimum="0" Maximum="240" Value="0"/>
<Label x:Name="Top_Value" Content="{Binding ElementName=Top_Slider,Path=Value}" ContentStringFormat="{}{0:N0}" Grid.Row="4" Grid.Column="1" Foreground="{StaticResource SecondaryBrandBrush}" HorizontalAlignment="Left" VerticalAlignment="Center" />
<Label x:Name="Bot_Title" Content="BOTTOM BOUND" Foreground="{StaticResource SecondaryBrandBrush}" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" Grid.Row="5" Grid.Column="0" />
<Slider x:Name="Bot_Slider" HorizontalAlignment="Left" Margin="10,20,0,0" VerticalAlignment="Top" Width="200" Style="{StaticResource SliderStyle}" Grid.Row="5" Grid.Column="0" Minimum="0" Maximum="240" Value="240"/>
<Label x:Name="Bot_Value" Content="{Binding ElementName=Bot_Slider,Path=Value}" ContentStringFormat="{}{0:N0}" Grid.Row="5" Grid.Column="1" Foreground="{StaticResource SecondaryBrandBrush}" HorizontalAlignment="Left" VerticalAlignment="Center" />
</Grid>
<!--EndSliderArea-->
<!--Begin Radio-->
<Label x:Name="Filter_Type_Title" Content="FILTER TYPE" Foreground="{StaticResource SecondaryBrandBrush}" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" Grid.Row="2" />
<RadioButton Name="Filter_Off" Content="Off" HorizontalAlignment="Left" Margin="10,30,0,0" Grid.Row="2" VerticalAlignment="Top" IsChecked="True" />
<RadioButton Name="Filter_Blur" Content="Blur" HorizontalAlignment="Left" Margin="60,30,0,0" Grid.Row="2" VerticalAlignment="Top" />
<!--End Radio-->
<!--ModelNameArea-->
<Grid x:Name="ModelNameArea" Grid.Row="4">
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label x:Name="Name_Label" Content="MODEL NAME:" Foreground="{StaticResource SecondaryBrandBrush}" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Margin="7,0,0,0" />
<TextBox x:Name="Model_Name" Text="modelName" HorizontalAlignment="Left" VerticalAlignment="Top" Width="140" Margin="17,0,0,0" Grid.Column="1" />
</Grid>
<!--EndModelNameArea-->
<Button x:Name ="Export_Model" VerticalAlignment="Bottom" Margin="50,0,0,23" Style="{StaticResource KinectButton}" Grid.Row="5" Click="Export_Model_Click">
<StackPanel Orientation="Horizontal">
<Label x:Name="Export_Label" Content="EXPORT MODEL" Foreground="White" FontFamily="{StaticResource KinectFont}" FontSize="14" Padding="0,0,10,0"/>
<Image x:Name="Download" Source="Images/download.png" Width="23" Height="23" HorizontalAlignment="Left" VerticalAlignment="Top" />
</StackPanel>
</Button>
<!-- <TextBox Name="test_text" HorizontalAlignment="Left" Height="109" Margin="42,124,0,0" Grid.Row="3" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="209"/> -->
</Grid>
<!--MenuArea-->
<tk:KinectSensorChooserUI Name="sensorChooserUI" HorizontalAlignment="Center" Margin="330,0,330,5"/>
</Grid>
<!--LayoutGrid-->
</Window>