<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net5.0</TargetFramework>
- <Version>1.0.13</Version>
- <AssemblyVersion>1.0.0.13</AssemblyVersion>
- <FileVersion>1.0.0.13</FileVersion>
+ <Version>1.0.14</Version>
+ <AssemblyVersion>1.0.0.14</AssemblyVersion>
+ <FileVersion>1.0.0.14</FileVersion>
<Authors>Greg Burri</Authors>
<Product />
<Company>CHUV & HES-SO</Company>
else
Some parameters
+ win.butSelectAll.Click.AddHandler (
+ fun obj args ->
+ for srcImgCtrl in win.stackSourceImagesSelection.Children |> Seq.cast<ImageSourceSelection> do
+ srcImgCtrl.chkSelection.IsChecked <- true
+ )
+
+ win.butUnselectAll.Click.AddHandler (
+ fun obj args ->
+ for srcImgCtrl in win.stackSourceImagesSelection.Children |> Seq.cast<ImageSourceSelection> do
+ srcImgCtrl.chkSelection.IsChecked <- false
+ )
+
win.butClose.Click.AddHandler (fun obj args -> win.Close ())
win.butStart.Click.AddHandler (
MessageBox.Show ("No image selected", "Cannot start analysis", MessageBoxButton.OK, MessageBoxImage.Information) |> ignore
else
win.stackSourceImagesSelection.IsEnabled <- false
+ win.butSelectAll.IsEnabled <- false
+ win.butUnselectAll.IsEnabled <- false
analysisPerformed <- false
win.butStart.IsEnabled <- false
win.textLog.Text <- ""
fun () ->
win.progress.Value <- if maybeResults.IsSome then 100. else 0.
win.stackSourceImagesSelection.IsEnabled <- true
+ win.butSelectAll.IsEnabled <- true
+ win.butUnselectAll.IsEnabled <- true
win.butStart.IsEnabled <- true
win.butClose.Content <- "Close"
updateSourceImages ()
statusMessageTimer.Start ()
let highlightRBC (rbc : RBC) (highlight : bool) =
- let strokeThickness = frameStrokeThickness ()
+ let highlightRBCFrame (rbcFrame : RBCFrame) (strokeThickness : float) =
+ if highlight then
+ rbcFrame.border.StrokeThickness <- 3. * strokeThickness
+ if not rbc.infected && not rbc.setManually && not displayHealthy then rbcFrame.Opacity <- 1.
+ else
+ rbcFrame.border.StrokeThickness <- strokeThickness
+ if not rbc.infected && not rbc.setManually && not displayHealthy then rbcFrame.Opacity <- 0.
- for rbcFrame in (win.stackRBC.Children |> Seq.cast<RBCFrame>).Concat(win.canvasCurrentImage.Children |> Seq.cast<RBCFrame>) do
+ for rbcFrame in win.stackRBC.Children |> Seq.cast<RBCFrame> do
if (rbcFrame.Tag :?> RBC) = rbc then
- if highlight then
- rbcFrame.border.StrokeThickness <- 3. * strokeThickness
- if not rbc.infected && not rbc.setManually && not displayHealthy then rbcFrame.Opacity <- 1.
- else
- rbcFrame.border.StrokeThickness <- strokeThickness
- if not rbc.infected && not rbc.setManually && not displayHealthy then rbcFrame.Opacity <- 0.
+ highlightRBCFrame rbcFrame 1.
+
+ let strokeThicknessCanvas = frameStrokeThickness ()
+
+ for rbcFrame in win.canvasCurrentImage.Children |> Seq.cast<RBCFrame> do
+ if (rbcFrame.Tag :?> RBC) = rbc then
+ highlightRBCFrame rbcFrame strokeThicknessCanvas
let zoomToRBC (rbc : RBC) =
win.scrollViewCurrentImage.ScrollToHorizontalOffset (rbc.center.X * currentScale - win.scrollViewCurrentImage.ViewportWidth / 2. + win.borderCurrentImage.BorderThickness.Left)
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
- <AssemblyVersion>1.0.0.13</AssemblyVersion>
- <FileVersion>1.0.0.13</FileVersion>
- <Version>1.0.13</Version>
+ <AssemblyVersion>1.0.0.14</AssemblyVersion>
+ <FileVersion>1.0.0.14</FileVersion>
+ <Version>1.0.14</Version>
<Authors>Greg Burri</Authors>
<Company>CHUV & HES-SO</Company>
<Win32Resource></Win32Resource>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50*"/>
- <RowDefinition Height="30"/>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
<RowDefinition Height="20*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ScrollViewer x:Name="scrollImagesSourceSelection" x:FieldModifier="public" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden" Grid.Row="0" Margin="3" >
<StackPanel x:Name="stackSourceImagesSelection" x:FieldModifier="public" />
</ScrollViewer>
- <ProgressBar x:Name="progress" x:FieldModifier="public" Grid.Row="1" Margin="3" Minimum="0" Maximum="100" />
- <ScrollViewer x:Name="scrollLog" x:FieldModifier="public" Grid.Row="2" Margin="3" HorizontalScrollBarVisibility="Auto">
+ <Grid Grid.Row="1">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition />
+ <ColumnDefinition />
+ </Grid.ColumnDefinitions>
+ <Button x:Name="butSelectAll" x:FieldModifier="public" Content="Select all" Grid.Column="0" Margin="3" />
+ <Button x:Name="butUnselectAll" x:FieldModifier="public" Content="Unselect all" Grid.Column="1" Margin="3" />
+ </Grid>
+ <ProgressBar x:Name="progress" x:FieldModifier="public" Grid.Row="2" Margin="3" Minimum="0" Maximum="100" Height="20" />
+ <ScrollViewer x:Name="scrollLog" x:FieldModifier="public" Grid.Row="3" Margin="3" HorizontalScrollBarVisibility="Auto">
<TextBlock x:Name="textLog" x:FieldModifier="public" />
</ScrollViewer>
- <Grid Grid.Row="3">
+ <Grid Grid.Row="4">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>