123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <Window x:Class="aipdev.TaskConflictImageViewer"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- 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"
- xmlns:model="clr-namespace:AIPlatform.Protocol.Model;assembly=AIPlatform.Protocol"
- xmlns:local="clr-namespace:aipdev"
- mc:Ignorable="d"
- Title="图像浏览器" Height="768" Width="1024" ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
- <Window.Resources>
- <Style TargetType="{x:Type TextBox}" x:Key="ReadOnlyTextBoxStyle">
- <Style.Setters>
- <Setter Property="IsReadOnly" Value="True"/>
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="HorizontalAlignment" Value="Left"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- </Style.Setters>
- </Style>
- </Window.Resources>
- <Grid Background="Black">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="55"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="55"/>
- <ColumnDefinition Width="0.35*"/>
- </Grid.ColumnDefinitions>
- <Image x:Name="Image" Grid.Column="0" Grid.ColumnSpan="3"/>
- <Button Grid.Column="0" Margin="4,0,0,0" x:Name="PreviousImage" Width="64" Height="2000" OverridesDefaultStyle="True" Click="OnPreviousImageClick">
- <Button.Template>
- <ControlTemplate>
- <Grid x:Name="Bb" Width="64">
- <Border Background="Black" Opacity="0.5"></Border>
- <Border x:Name="Bib">
- <Image Opacity="0.5" x:Name="Bi" Width="50" Height="50" Stretch="Uniform" VerticalAlignment="Center" HorizontalAlignment="Center" Source="Resources/Images/Left.png"></Image>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="Button.IsMouseOver" Value="True">
- <Setter TargetName="Bi" Property="Opacity" Value="1"/>
- </Trigger>
- <Trigger Property="Button.IsPressed" Value="True">
- <Setter TargetName="Bib" Property="Padding" Value="2"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button Grid.Column="2" Margin="0,0,4,0" x:Name="NextImage" Width="64" Height="1000" OverridesDefaultStyle="True" Click="OnNextImageClick">
- <Button.Template>
- <ControlTemplate>
- <Grid x:Name="Bb" Width="64">
- <Border Background="Black" Opacity="0.5"></Border>
- <Border x:Name="Bib">
- <Image Opacity="0.5" x:Name="Bi" Width="50" Height="50" Stretch="Uniform" VerticalAlignment="Center" HorizontalAlignment="Center" Source="Resources/Images/Right.png"></Image>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="Button.IsMouseOver" Value="True">
- <Setter TargetName="Bi" Property="Opacity" Value="1"/>
- </Trigger>
- <Trigger Property="Button.IsPressed" Value="True">
- <Setter TargetName="Bib" Property="Padding" Value="2"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <ScrollViewer Grid.Column="3" VerticalScrollBarVisibility="Auto">
- <StackPanel>
- <StackPanel Orientation="Horizontal" Margin="4">
- <TextBlock Text="当前图像:" FontSize="12" Foreground="White" VerticalAlignment="Center" IsHitTestVisible="False"/>
- <TextBlock x:Name="CurrentCaseImageIndex" FontSize="12" Foreground="White" VerticalAlignment="Center" IsHitTestVisible="False"/>
- <TextBlock Text="/" FontSize="12" Foreground="White" VerticalAlignment="Center" IsHitTestVisible="False"/>
- <TextBlock x:Name="TotalCaseImageCount" FontSize="12" Foreground="White" VerticalAlignment="Center" Margin="0,0,30,0" IsHitTestVisible="False"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="4">
- <TextBlock Text="跳转页面至第" FontSize="12" Foreground="White" VerticalAlignment="Center"/>
- <TextBox Height="18" FontSize="12" VerticalContentAlignment="Center" Padding="0" Margin="2,0" Width="50" HorizontalContentAlignment="Center" x:Name="LabeledImageIndexTextBox"
- PreviewKeyDown="LabeledImageIndexTextBox_PreviewKeyDown"/>
- <TextBlock Text="页" FontSize="12" Foreground="White" VerticalAlignment="Center"/>
- </StackPanel>
- <!--<GroupBox Margin="4" MinHeight="64" Header="图像标签" Foreground="White" BorderBrush="Gray" BorderThickness="1" >
- <StackPanel VerticalAlignment="Center">
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" x:Name="CombinationTagNameTextBox" TextWrapping="Wrap" />
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" x:Name="CombinationTagIdTextBox" TextWrapping="Wrap" />
- </StackPanel>
- </GroupBox>-->
- <GroupBox Margin="4" MinHeight="64" Header="图像信息" Foreground="White" BorderBrush="Gray" BorderThickness="0.5" >
- <StackPanel VerticalAlignment="Center">
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" x:Name="ImageNameTextBox" TextWrapping="Wrap" />
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" x:Name="ImageIdTextBox" TextWrapping="Wrap" />
- </StackPanel>
- </GroupBox>
- <StackPanel VerticalAlignment="Center" Margin="3,5,0,0">
- <TextBlock Foreground="White" Text="标注结论" VerticalAlignment="Center" HorizontalAlignment="Center" />
- </StackPanel>
- <ItemsControl x:Name="Conclusions">
- <ItemsControl.Resources>
- <DataTemplate DataType="{x:Type model:ConflictLabelConclusion}">
- <GroupBox BorderThickness="0.5" Foreground="White" BorderBrush="Gray" x:Name="ResultGroup" Header="{Binding Annotator}" PreviewMouseLeftButtonDown="OnResultMouseLeftButtonDown">
- <StackPanel>
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Text="{Binding ImageContent}" TextWrapping="Wrap"/>
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Text="{Binding RoiContent}" TextWrapping="Wrap"/>
- </StackPanel>
- </GroupBox>
- <DataTemplate.Triggers>
- <!--鼠标经过样式-->
- <Trigger Property="Button.IsMouseOver" Value="True">
- <Setter TargetName="ResultGroup" Property="BorderBrush" Value="Yellow"/>
- </Trigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </ItemsControl.Resources>
- </ItemsControl>
- </StackPanel>
- </ScrollViewer>
- <local:WaitingSpinner Grid.Column="0" Grid.ColumnSpan="2" x:Name="Waiting"/>
- </Grid>
- </Window>
|