MainWindow.xaml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <Window x:Class="HumanOrganSegmentDemo.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:HumanOrganSegmentDemo"
  7. mc:Ignorable="d"
  8. Title="人体脏器轮廓分割" Height="600" Width="1000" Closing="Window_Closing">
  9. <Grid >
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="*"/>
  12. <RowDefinition Height="50"/>
  13. <RowDefinition Height="50"/>
  14. <RowDefinition Height="50"/>
  15. </Grid.RowDefinitions>
  16. <Grid.ColumnDefinitions>
  17. <ColumnDefinition Width="*"/>
  18. </Grid.ColumnDefinitions>
  19. <Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
  20. <local:ImageCanvas x:Name="MyImageCanvas"/>
  21. </Grid>
  22. <Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
  23. <StackPanel Orientation="Horizontal">
  24. <TextBlock Text="相机类型:" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center"/>
  25. <ComboBox x:Name="ComboBoxCameraType" FontSize="12" Margin="4,4,4,4" Width="60" VerticalAlignment="Center" SelectionChanged="OnComboBoxCameraTypeSelectionChanged"/>
  26. <ComboBox x:Name="ComboBoxCameras" Margin="4,4,4,4" Width="120" VerticalAlignment="Center" SelectionChanged="OnComboBoxCardsSelectionChanged"/>
  27. <Button x:Name="BtnRefreshCameras" Content="相机列表刷新" Margin="4,4,4,4" Width="80" Click="OnRefreshCardsClick"/>
  28. <Button x:Name="BtnOpenCameras" Content="打开相机" Margin="4,4,4,4" Width="60" Click="OnBtnOpenCameraClick"/>
  29. <TextBlock Text="脏器类型:" FontSize="20" Margin="30,4,4,4" VerticalAlignment="Center"/>
  30. <ComboBox x:Name="ComboBoxOrganType" FontSize="20" Margin="4,4,4,4" Width="80" VerticalAlignment="Center" SelectionChanged="OnComboBoxOrganTypeSelectionChanged"/>
  31. </StackPanel>
  32. </Grid>
  33. <Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2">
  34. <StackPanel Orientation="Horizontal">
  35. <Button Content="加载图片" FontSize="20" Margin="30,4,20,4" Width="140" Click="OnBtnLoadImagClicked"/>
  36. <CheckBox x:Name="CheckboxIsCropped" IsChecked="True" Content="已裁切" VerticalContentAlignment="Center" VerticalAlignment="Center"
  37. FontSize="20" Margin="10,4,10,4" Checked="OnCheckedIsCropped" Unchecked="OnUncheckedIsCropped"/>
  38. <TextBlock Text="推理时间(毫秒):" FontSize="20" Margin="10,4,4,4" VerticalAlignment="Center"/>
  39. <TextBlock x:Name="ForwardTime" FontSize="20" Margin="4,4,10,4" VerticalAlignment="Center" Width="60"/>
  40. <TextBlock Text="裁图时间(毫秒):" FontSize="20" Margin="10,4,4,4" VerticalAlignment="Center"/>
  41. <TextBlock x:Name="CropImageTime" FontSize="20" Margin="4,4,10,4" VerticalAlignment="Center" Width="60"/>
  42. <TextBlock Text="CPU数量:" FontSize="20" Margin="10,4,4,4" VerticalAlignment="Center"/>
  43. <TextBox x:Name="TextBoxCPU" Text ="1" FontSize="18" Margin="4,4,10,4" VerticalAlignment="Center" Width="51"/>
  44. </StackPanel>
  45. </Grid>
  46. <Grid Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" >
  47. <StackPanel Orientation="Horizontal">
  48. <Button Content="开始执行" FontSize="20" Margin="30,4,20,4" Width="140" Click="OnBtnRunClicked"/>
  49. <Button Content="停止执行" FontSize="20" Margin="30,4,20,4" Width="140" Click="OnBtnStopClicked"/>
  50. </StackPanel>
  51. </Grid>
  52. </Grid>
  53. </Window>