123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- <Window x:Class="AIDiagnosisDemo.Presentation.SettingWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:extensions="clr-namespace:AIDiagnosisDemo.Extensions"
- mc:Ignorable="d"
- Title="系统设置" Height="580" Width="430" WindowStartupLocation="CenterScreen">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <ScrollViewer Grid.Row="0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
- <StackPanel Margin="5">
- <GroupBox Header="超声图像来源">
- <StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="图像来源" Margin="5" Width="120" VerticalAlignment="Center" ></TextBlock>
- <ComboBox Width="230" VerticalAlignment="Center" ItemsSource="{Binding UltrasoundImageSourceTypeList, Converter={extensions:SourceTypeListToStringListConverter}}" HorizontalContentAlignment="Center"
- Cursor="Hand" SelectedItem="{Binding UltrasoundImageSourceType, Converter={extensions:SourceTypeToStringConverter}}" />
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="输入源" Margin="5" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBlock>
- <StackPanel Orientation="Horizontal" Visibility="{Binding IsDeviceSelected,Converter={extensions:BoolToVisibilityConverter},ConverterParameter=Reverse}">
- <TextBox Height="25" Margin="5" Width="185" VerticalAlignment="Center" Text="{Binding VideoFilePath}" ToolTip="{Binding VideoFilePath}" IsReadOnly="True" />
- <Button Margin="5" Content="浏览" Width="35" Command="{Binding BrowseCommand}" />
- </StackPanel>
- <ComboBox Margin="5" Width="230" VerticalAlignment="Center" ItemsSource="{Binding DeviceSourceList}" SelectedItem="{Binding UltrasoundImageSource}" HorizontalContentAlignment="Center"
- DisplayMemberPath="Name" Visibility="{Binding IsDeviceSelected,Converter={extensions:BoolToVisibilityConverter}}" />
- </StackPanel>
- </StackPanel>
- </GroupBox>
- <GroupBox Header="AI功能设定">
- <StackPanel Orientation="Vertical">
- <StackPanel Orientation="Horizontal">
- <TextBlock Margin="5" Text="启用AI诊断" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBlock>
- <CheckBox Margin="5" VerticalAlignment="Center" IsChecked="{Binding IsEnableAI}" HorizontalAlignment="Center" ></CheckBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" IsEnabled="{Binding IsEnableAI}">
- <TextBlock Margin="5" Text="AI性能" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBlock>
- <ComboBox Margin="5" Width="230" VerticalAlignment="Center" SelectedValue="{Binding Performance}" SelectedValuePath="Tag"
- Cursor="Hand" HorizontalContentAlignment="Center">
- <ComboBoxItem Content="低" Tag="Low" />
- <ComboBoxItem Content="中" Tag="Medium" />
- <ComboBoxItem Content="较高" Tag="High" />
- <ComboBoxItem Content="高" Tag="Maximum" />
- </ComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" IsEnabled="{Binding IsEnableAI}">
- <TextBlock Margin="5" Text="去除超声图像无效区域" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBlock>
- <CheckBox Margin="5" IsChecked="{Binding CropImage}" FontSize="10" Foreground="Gray" Content="(启用此设置可兼容各种超声图像,但会降低性能)"></CheckBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" IsEnabled="{Binding IsEnableAI}">
- <TextBlock Margin="5" Text="检测模式" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBlock>
- <ComboBox Margin="5" Width="230" VerticalAlignment="Center" SelectedValue="{Binding DetectMode}" SelectedValuePath="Tag"
- Cursor="Hand" HorizontalContentAlignment="Center">
- <ComboBoxItem Content="按每秒频次计算" Tag="TimesPerSecond" />
- <ComboBoxItem Content="按时间间隔计算" Tag="PeriodicIntervals" />
- </ComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" IsEnabled="{Binding IsEnableAI}">
- <TextBlock Margin="5" Text="超声图像检测间隔" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBlock>
- <StackPanel Orientation="Horizontal" Visibility="{Binding IsIntervalTimeMode,Converter={extensions:BoolToVisibilityConverter}}">
- <TextBox Height="25" Margin="5" Width="185" VerticalAlignment="Center" Text="{Binding IntervalTime}" HorizontalContentAlignment="Center" />
- <TextBlock Margin="5" Text="ms" VerticalAlignment="Center" Width="35" />
- </StackPanel>
- <ComboBox Width="230" VerticalAlignment="Center" SelectedValue="{Binding DetectTps}" SelectedValuePath="Content"
- Cursor="Hand" HorizontalContentAlignment="Center" Visibility="{Binding IsIntervalTimeMode,Converter={extensions:BoolToVisibilityConverter},ConverterParameter=Reverse}">
- <ComboBoxItem Content="1" />
- <ComboBoxItem Content="2" />
- <ComboBoxItem Content="3" />
- <ComboBoxItem Content="4" />
- <ComboBoxItem Content="5" />
- </ComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" IsEnabled="{Binding IsEnableAI}">
- <TextBlock Margin="5" Text="显示脏器轮廓" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBlock>
- <CheckBox Margin="5" VerticalAlignment="Center" IsChecked="{Binding IsShowOrgansContour}" HorizontalAlignment="Center" ></CheckBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" IsEnabled="{Binding IsEnableAI}">
- <TextBlock Margin="5" Text="病灶显示" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBlock>
- <ComboBox Margin="5" Width="230" VerticalAlignment="Center" SelectedValue="{Binding ShowLesions}" SelectedValuePath="Tag"
- Cursor="Hand" HorizontalContentAlignment="Center">
- <ComboBoxItem Content="轮廓" Tag="Contour" />
- <ComboBoxItem Content="边框" Tag="Border" />
- </ComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" IsEnabled="{Binding IsEnableAI}">
- <TextBlock Margin="5" Text="AI识别类型" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBlock>
- <ComboBox Margin="5" Width="230" VerticalAlignment="Center" SelectedValue="{Binding AIDiagnosisType}" SelectedValuePath="Tag"
- Cursor="Hand" HorizontalContentAlignment="Center">
- <ComboBoxItem Content="常规" Tag="Normal" />
- <ComboBoxItem Content="心肌" Tag="Myocardial" />
- <ComboBoxItem Content="小鼠心肌" Tag="MiceMyocardial" />
- <ComboBoxItem Content="大鼠心肌" Tag="RatMyocardial" />
- <ComboBoxItem Content="甲状腺切面" Tag="ThyroidClassification" />
- <ComboBoxItem Content="脏器识别" Tag="OrganIdentification" />
- </ComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" IsEnabled="{Binding IsEnableAI}">
- <TextBlock Margin="5" Text="心肌圆环形是否补全" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBlock>
- <CheckBox Margin="5" VerticalAlignment="Center" IsChecked="{Binding CompleteMyocardialImg}" HorizontalAlignment="Center" />
- </StackPanel>
- </StackPanel>
- </GroupBox>
- <GroupBox Header="模拟占用">
- <StackPanel Orientation="Vertical">
- <StackPanel Orientation="Horizontal">
- <TextBlock Margin="5" Text="启用模拟占用" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBlock>
- <CheckBox Margin="5" VerticalAlignment="Center" IsChecked="{Binding IsSimulation}" HorizontalAlignment="Center" ></CheckBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" IsEnabled="{Binding IsSimulation}">
- <TextBlock Margin="5" Text="CPU占用(10%-90%)" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBlock>
- <ComboBox Width="230" VerticalAlignment="Center" SelectedValue="{Binding CPUUsed}" SelectedValuePath="Tag"
- Cursor="Hand" HorizontalContentAlignment="Center">
- <ComboBoxItem Content="0%" Tag="0" />
- <ComboBoxItem Content="10%" Tag="10" />
- <ComboBoxItem Content="20%" Tag="20" />
- <ComboBoxItem Content="30%" Tag="30" />
- <ComboBoxItem Content="40%" Tag="40" />
- <ComboBoxItem Content="50%" Tag="50" />
- <ComboBoxItem Content="60%" Tag="60" />
- <ComboBoxItem Content="70%" Tag="70" />
- <ComboBoxItem Content="80%" Tag="80" />
- <ComboBoxItem Content="90%" Tag="90" />
- </ComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" IsEnabled="{Binding IsSimulation}">
- <TextBlock Margin="5" Text="内存占用(10%-90%)" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left"></TextBlock>
- <ComboBox Width="230" VerticalAlignment="Center" SelectedValue="{Binding RAMUsed}" SelectedValuePath="Tag"
- Cursor="Hand" HorizontalContentAlignment="Center">
- <ComboBoxItem Content="0%" Tag="0" />
- <ComboBoxItem Content="10%" Tag="10" />
- <ComboBoxItem Content="20%" Tag="20" />
- <ComboBoxItem Content="30%" Tag="30" />
- <ComboBoxItem Content="40%" Tag="40" />
- <ComboBoxItem Content="50%" Tag="50" />
- <ComboBoxItem Content="60%" Tag="60" />
- <ComboBoxItem Content="70%" Tag="70" />
- <ComboBoxItem Content="80%" Tag="80" />
- <ComboBoxItem Content="90%" Tag="90" />
- </ComboBox>
- </StackPanel>
- </StackPanel>
- </GroupBox>
- </StackPanel>
- </ScrollViewer>
- <Grid Grid.Row="1" HorizontalAlignment="Center">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
- <Button Margin="5" Height="25" Width="70" Content="保存并退出" Click="OnSaveAndExit" />
- </StackPanel>
- </Grid>
- </Grid>
- </Window>
|