1
0

MainWindow.xaml 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <Window x:Class="SegmentDescribDemo.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:SegmentDescribDemo"
  7. mc:Ignorable="d"
  8. Title="MainWindow" Height="520" Width="1200" Closing="Window_Closing">
  9. <Grid>
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="*"/>
  12. <RowDefinition Height="40"/>
  13. <RowDefinition Height="40"/>
  14. <RowDefinition Height="40"/>
  15. <RowDefinition Height="40"/>
  16. </Grid.RowDefinitions>
  17. <Grid.ColumnDefinitions>
  18. <ColumnDefinition Width="*"/>
  19. <ColumnDefinition Width="*"/>
  20. </Grid.ColumnDefinitions>
  21. <Grid Grid.Row="0" Grid.Column="0" x:Name="GridOrigImg" SizeChanged="Canvas_SizeChanged">
  22. <Canvas x:Name="MyCanvas"
  23. MouseLeftButtonDown="Canvas_MouseLeftBtnDown"
  24. MouseMove="Canvas_MouseMove">
  25. <Image x:Name="OrigImage" Stretch="Fill">
  26. <Image.RenderTransform>
  27. <ScaleTransform x:Name="OrigImgScaleTramsform"/>
  28. </Image.RenderTransform>
  29. </Image>
  30. </Canvas>
  31. </Grid>
  32. <Grid Grid.Row="0" Grid.Column="1">
  33. <Image x:Name="DstImage"></Image>
  34. </Grid>
  35. <Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
  36. <StackPanel Orientation="Horizontal">
  37. <Button Content="加载一幅图像" FontSize="12" Margin="4,4,4,4" Width="100" Click="OnLoadOneImageClick"/>
  38. <TextBlock Text="鼠标位置:" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="60"/>
  39. <TextBlock x:Name="MousePosition" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="50"/>
  40. <TextBlock Text="ROI:" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="30"/>
  41. <TextBlock x:Name="ROI" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="90"/>
  42. <Button Content="使用当前绘制的ROI" FontSize="12" Margin="4,4,4,4" Width="120" Click="OnUseCurrentROIClick"/>
  43. <Button Content="开始连续测试" FontSize="12" Margin="4,4,4,4" Width="100" Click="OnStartContinuousTestClick"/>
  44. <Button Content="停止连续测试" FontSize="12" Margin="4,4,4,4" Width="100" Click="OnStopContinuousTestClick"/>
  45. <TextBlock Text="耗时:" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="30"/>
  46. <TextBlock x:Name="ElapsedTime" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="60"/>
  47. <TextBlock Text="ms" FontSize="12" Margin="4,12" VerticalAlignment="Center"/>
  48. <RadioButton GroupName="Func" x:Name="FuncACWE" Content="ACWE" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="4,4,4,4"/>
  49. <RadioButton GroupName="Func" x:Name="FuncFCM" Content="FCM" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,4,4,4"></RadioButton>
  50. <RadioButton GroupName="Func" x:Name="FuncDRLSE" Content="DRLSE" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,4,4,4"></RadioButton>
  51. <RadioButton GroupName="Func" x:Name="FuncLBF" Content="LBF" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,4,4,4"></RadioButton>
  52. <RadioButton GroupName="Func" x:Name="FuncLSEWR" Content="LSEWR" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,4,4,4"></RadioButton>
  53. <RadioButton GroupName="Func" IsChecked="True" x:Name="FuncBLS" Content="BLS" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,4,4,4"></RadioButton>
  54. </StackPanel>
  55. </Grid>
  56. <Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2">
  57. <StackPanel Orientation="Horizontal">
  58. <TextBlock FontSize="12" Margin="4,12,4,0" VerticalAlignment="Top" Width="55" Height="18"><Run Text="生长"/><Run Text="方向"/><Run Text=":"/></TextBlock>
  59. <TextBlock x:Name="GrowDirectionDescri" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="70"/>
  60. <TextBlock FontSize="12" Margin="4,12,4,0" VerticalAlignment="Top" Width="40" Height="18"><Run Text="形状"/><Run Text=":"/></TextBlock>
  61. <TextBlock x:Name="ContourShapeDescri" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="70"/>
  62. <TextBlock FontSize="12" Margin="4,12,4,10" VerticalAlignment="Center" Width="60" Height="18"><Run Text="回声"/><Run Text="类型"/><Run Text=":"/></TextBlock>
  63. <TextBlock x:Name="EchoPatternDescri" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="80"/>
  64. <TextBlock FontSize="12" Margin="4,12,4,0" VerticalAlignment="Top" Width="70" Height="18"><Run Text="边界清晰度"/><Run Text=":"/></TextBlock>
  65. <TextBlock x:Name="BoundaryBoundaryDescri" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="80"/>
  66. <TextBlock FontSize="12" Margin="4,12,4,0" VerticalAlignment="Top" Width="67" Height="18"><Run Text="边缘光整度"/><Run Text=":"/></TextBlock>
  67. <TextBlock x:Name="EdgeMarginDescri" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="80"/>
  68. <TextBlock FontSize="12" Margin="4,12,4,0" VerticalAlignment="Top" Width="67" Height="18"><Run Text="钙化"/><Run Text=":"/></TextBlock>
  69. <TextBlock x:Name="EdgeCificationDescri" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="80"/>
  70. </StackPanel>
  71. </Grid>
  72. <Grid Grid.Row="3" Grid.Column="0">
  73. <StackPanel Orientation="Horizontal">
  74. <Button Content="加载图像数据库" HorizontalAlignment="Left" FontSize="12" Margin="4,4,4,4" Width="100" Click="OnLoadDataBaseClick"/>
  75. <Button Content="加载图像" FontSize="12" Margin="4,4,4,4" Width="100" Click="OnLoadOneImageDBClick" Height="32" />
  76. <Button Content="加载多幅图像" FontSize="12" Margin="4,4,4,4" Width="100" Click="OnLoadOneImagesClick" Height="32" />
  77. <Button Content="全模型单张" FontSize="12" Margin= "4,4,4,4" Width="100" Click="OnModelsProcessClick"/>
  78. <Button Content="全模型多张" FontSize="12" Margin= "4,4,4,4" Width="100" Click="OnModelsProcessAllClick"/>
  79. </StackPanel>
  80. </Grid>
  81. <Grid Grid.Row="3" Grid.Column="1">
  82. <StackPanel Orientation="Horizontal">
  83. <Button Content="处理DB文件图像" FontSize="12" Margin="4,4,4,4" Width="100" Click="OnDrawImageDBClick" Height="32" />
  84. </StackPanel>
  85. </Grid>
  86. <Grid Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2">
  87. <StackPanel Orientation="Horizontal">
  88. <TextBlock FontSize="12" Margin="4,12,4,0" VerticalAlignment="Top" Width="55" Height="18"><Run Text="生长"/><Run Text="方向"/><Run Text=":"/></TextBlock>
  89. <TextBlock x:Name="GrowDirectionDescriPr" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="70"/>
  90. <TextBlock FontSize="12" Margin="4,12,4,0" VerticalAlignment="Top" Width="40" Height="18"><Run Text="形状"/><Run Text=":"/></TextBlock>
  91. <TextBlock x:Name="ContourShapeDescriPr" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="70"/>
  92. <TextBlock FontSize="12" Margin="4,12,4,10" VerticalAlignment="Center" Width="60" Height="18"><Run Text="回声"/><Run Text="类型"/><Run Text=":"/></TextBlock>
  93. <TextBlock x:Name="EchoPatternDescriPr" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="80"/>
  94. <TextBlock FontSize="12" Margin="4,12,4,0" VerticalAlignment="Top" Width="70" Height="18"><Run Text="边界清晰度"/><Run Text=":"/></TextBlock>
  95. <TextBlock x:Name="BoundaryBoundaryDescriPr" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="80"/>
  96. <TextBlock FontSize="12" Margin="4,12,4,0" VerticalAlignment="Top" Width="67" Height="18"><Run Text="边缘光整度"/><Run Text=":"/></TextBlock>
  97. <TextBlock x:Name="EdgeMarginDescriPr" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="80"/>
  98. <TextBlock FontSize="12" Margin="4,12,4,0" VerticalAlignment="Top" Width="67" Height="18"><Run Text="钙化"/><Run Text=":"/></TextBlock>
  99. <TextBlock x:Name="EdgeCificationDescriPr" FontSize="12" Margin="4,4,4,4" VerticalAlignment="Center" Width="80"/>
  100. </StackPanel>
  101. </Grid>
  102. </Grid>
  103. </Window>