To .NET 5 (lot of refactoring)
authorGreg Burri <greg.burri@gmail.com>
Sat, 20 Mar 2021 14:20:03 +0000 (15:20 +0100)
committerGreg Burri <greg.burri@gmail.com>
Sat, 20 Mar 2021 14:20:03 +0000 (15:20 +0100)
78 files changed:
Parasitemia/Logger/Logger.fs
Parasitemia/Logger/Logger.fsproj
Parasitemia/Parasitemia.sln
Parasitemia/ParasitemiaCore/Analysis.fs
Parasitemia/ParasitemiaCore/Classifier.fs
Parasitemia/ParasitemiaCore/Ellipse.fs
Parasitemia/ParasitemiaCore/Granulometry.fs
Parasitemia/ParasitemiaCore/ImgTools/Drawing.fs
Parasitemia/ParasitemiaCore/ImgTools/Edges.fs
Parasitemia/ParasitemiaCore/ImgTools/IO.fs
Parasitemia/ParasitemiaCore/ImgTools/ImgTools.fs
Parasitemia/ParasitemiaCore/KMeans.fs
Parasitemia/ParasitemiaCore/MatchingEllipses.fs
Parasitemia/ParasitemiaCore/ParasitemiaCore.fsproj
Parasitemia/ParasitemiaCore/ParasitesMarker.fs
Parasitemia/ParasitemiaUI/About.fs
Parasitemia/ParasitemiaUI/Analysis.fs
Parasitemia/ParasitemiaUI/App.config [deleted file]
Parasitemia/ParasitemiaUI/BitmapSourceConvert.fs [new file with mode: 0644]
Parasitemia/ParasitemiaUI/CommandLineArguments.fs
Parasitemia/ParasitemiaUI/DPICalculator.fs
Parasitemia/ParasitemiaUI/GUI.fs
Parasitemia/ParasitemiaUI/ParasitemiaUI.fsproj
Parasitemia/ParasitemiaUI/PiaZ.fs
Parasitemia/ParasitemiaUI/Resources/chuv_logo.png [deleted file]
Parasitemia/ParasitemiaUI/Resources/hes-so_logo.png [deleted file]
Parasitemia/ParasitemiaUI/Resources/icon.ico [deleted file]
Parasitemia/ParasitemiaUI/SourceImage.fs
Parasitemia/ParasitemiaUI/Types.fs
Parasitemia/ParasitemiaUI/XAML/AboutWindow.xaml [deleted file]
Parasitemia/ParasitemiaUI/XAML/AboutWindow.xaml.fs [deleted file]
Parasitemia/ParasitemiaUI/XAML/AnalysisWindow.xaml [deleted file]
Parasitemia/ParasitemiaUI/XAML/AnalysisWindow.xaml.fs [deleted file]
Parasitemia/ParasitemiaUI/XAML/CommandLineArgumentsWindow.xaml [deleted file]
Parasitemia/ParasitemiaUI/XAML/CommandLineArgumentsWindow.xaml.fs [deleted file]
Parasitemia/ParasitemiaUI/XAML/ImageSourcePreview.xaml [deleted file]
Parasitemia/ParasitemiaUI/XAML/ImageSourcePreview.xaml.fs [deleted file]
Parasitemia/ParasitemiaUI/XAML/ImageSourceSelection.xaml [deleted file]
Parasitemia/ParasitemiaUI/XAML/ImageSourceSelection.xaml.fs [deleted file]
Parasitemia/ParasitemiaUI/XAML/MainWindow.xaml [deleted file]
Parasitemia/ParasitemiaUI/XAML/MainWindow.xaml.fs [deleted file]
Parasitemia/ParasitemiaUI/XAML/NumericUpDown.xaml [deleted file]
Parasitemia/ParasitemiaUI/XAML/NumericUpDown.xaml.fs [deleted file]
Parasitemia/ParasitemiaUI/XAML/PPICalculatorWindow.xaml [deleted file]
Parasitemia/ParasitemiaUI/XAML/PPICalculatorWindow.xaml.fs [deleted file]
Parasitemia/ParasitemiaUI/XAML/RBCFrame.xaml [deleted file]
Parasitemia/ParasitemiaUI/XAML/RBCFrame.xaml.fs [deleted file]
Parasitemia/ParasitemiaUIControls/AboutWindow.xaml [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/AboutWindow.xaml.cs [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/AnalysisWindow.xaml [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/AnalysisWindow.xaml.cs [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/CommandLineArgumentsWindow.xaml [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/CommandLineArgumentsWindow.xaml.cs [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/ImageSourcePreview.xaml [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/ImageSourcePreview.xaml.cs [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/ImageSourceSelection.xaml [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/ImageSourceSelection.xaml.cs [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/MainWindow.xaml [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/MainWindow.xaml.cs [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/NumericUpDown.xaml [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/NumericUpDown.xaml.cs [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/PPICalculatorWindow.xaml [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/PPICalculatorWindow.xaml.cs [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/ParasitemiaUIControls.csproj [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/RBCFrame.xaml [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/RBCFrame.xaml.cs [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/Resources/chuv_logo.png [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/Resources/hes-so_logo.png [new file with mode: 0644]
Parasitemia/ParasitemiaUIControls/Resources/icon.ico [new file with mode: 0644]
Parasitemia/Tests/ParasitemiaCore.Tests/ParasitemiaCore.Tests.fsproj
Parasitemia/Tests/ParasitemiaCore.Tests/packages.config
Parasitemia/WPF/BitmapSourceConverter.cs [deleted file]
Parasitemia/WPF/License-LGPL.txt [deleted file]
Parasitemia/WPF/OpenTK.dll.config [deleted file]
Parasitemia/WPF/Properties/AssemblyInfo.cs [deleted file]
Parasitemia/WPF/WPF.csproj [deleted file]
Parasitemia/WPF/app.config [deleted file]
Parasitemia/WPF/packages.config [deleted file]

index 4fc1736..7d54843 100644 (file)
@@ -109,7 +109,7 @@ type Log () =
         let header =
             String.Format (
                 "{0:yyyy-MM-dd HH:mm:ss.fff} [{1}] {{{2}}} ({3})",
-                TimeZone.CurrentTimeZone.ToLocalTime DateTime.UtcNow,
+                DateTime.Now,
                 string msg.Severity,
                 msg.ModuleCaller,
                 (if String.IsNullOrEmpty msg.ThreadName then string msg.ThreadId else sprintf "%s-%i" msg.ThreadName msg.ThreadId)
index 1aed49f..618ff42 100644 (file)
@@ -1,66 +1,17 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+<Project Sdk="Microsoft.NET.Sdk">
+
   <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>a4f183ae-562a-4bad-88e6-658b4ce15dc3</ProjectGuid>
     <OutputType>Library</OutputType>
-    <RootNamespace>Logger</RootNamespace>
-    <AssemblyName>Logger</AssemblyName>
-    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
-    <TargetFSharpCoreVersion>4.4.3.0</TargetFSharpCoreVersion>
-    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
-    <Name>Logger</Name>
-    <TargetFrameworkProfile />
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <Tailcalls>false</Tailcalls>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <WarningLevel>3</WarningLevel>
-    <DocumentationFile>bin\Debug\Logger.XML</DocumentationFile>
-    <PlatformTarget>AnyCPU</PlatformTarget>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <Tailcalls>true</Tailcalls>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <WarningLevel>3</WarningLevel>
-    <DocumentationFile>bin\Release\Logger.XML</DocumentationFile>
-    <PlatformTarget>AnyCPU</PlatformTarget>
+    <TargetFramework>net5.0</TargetFramework>
   </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="mscorlib" />
-    <Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Numerics" />
-  </ItemGroup>
+
   <ItemGroup>
     <Compile Include="AssemblyInfo.fs" />
     <Compile Include="Logger.fs" />
   </ItemGroup>
-  <PropertyGroup>
-    <MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
-  </PropertyGroup>
-  <PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')">
-    <FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
-  </PropertyGroup>
-  <Import Project="$(FSharpTargetsPath)" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
+
+  <ItemGroup>
+    <PackageReference Update="FSharp.Core" Version="5.0.1" />
+  </ItemGroup>
+
 </Project>
\ No newline at end of file
index 42e8f4e..15b5e71 100644 (file)
@@ -1,24 +1,23 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26430.6
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30804.86
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "ParasitemiaUI", "ParasitemiaUI\ParasitemiaUI.fsproj", "{70838E65-F211-44FC-B28F-0ED1CA6E850F}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "ParasitemiaUI", "ParasitemiaUI\ParasitemiaUI.fsproj", "{70838E65-F211-44FC-B28F-0ED1CA6E850F}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF", "WPF\WPF.csproj", "{314FD78E-870E-4794-BB16-EA4586F2ABDB}"
 EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Logger", "Logger\Logger.fsproj", "{A4F183AE-562A-4BAD-88E6-658B4CE15DC3}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Logger", "Logger\Logger.fsproj", "{A4F183AE-562A-4BAD-88E6-658B4CE15DC3}"
 EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "ParasitemiaCore", "ParasitemiaCore\ParasitemiaCore.fsproj", "{0F8A85F4-9328-40C3-B8FF-44FB39CEB01F}"
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "ParasitemiaCore", "ParasitemiaCore\ParasitemiaCore.fsproj", "{0F8A85F4-9328-40C3-B8FF-44FB39CEB01F}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{1EC5C716-CA52-46FD-A76C-BEF9459E5561}"
 EndProject
 Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "ParasitemiaCore.Tests", "Tests\ParasitemiaCore.Tests\ParasitemiaCore.Tests.fsproj", "{2AB542E3-5F90-48CA-9442-32B2780B3E4A}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ParasitemiaUIControls", "ParasitemiaUIControls\ParasitemiaUIControls.csproj", "{98E21672-B520-4CBA-86C7-6A0856367A10}"
+EndProject
 Global
-       GlobalSection(Performance) = preSolution
-               HasPerformanceSessions = true
-       EndGlobalSection
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Any CPU = Debug|Any CPU
                DebugGUI|Any CPU = DebugGUI|Any CPU
@@ -55,6 +54,12 @@ Global
                {2AB542E3-5F90-48CA-9442-32B2780B3E4A}.DebugGUI|Any CPU.Build.0 = Debug|Any CPU
                {2AB542E3-5F90-48CA-9442-32B2780B3E4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {2AB542E3-5F90-48CA-9442-32B2780B3E4A}.Release|Any CPU.Build.0 = Release|Any CPU
+               {98E21672-B520-4CBA-86C7-6A0856367A10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {98E21672-B520-4CBA-86C7-6A0856367A10}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {98E21672-B520-4CBA-86C7-6A0856367A10}.DebugGUI|Any CPU.ActiveCfg = Debug|Any CPU
+               {98E21672-B520-4CBA-86C7-6A0856367A10}.DebugGUI|Any CPU.Build.0 = Debug|Any CPU
+               {98E21672-B520-4CBA-86C7-6A0856367A10}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {98E21672-B520-4CBA-86C7-6A0856367A10}.Release|Any CPU.Build.0 = Release|Any CPU
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
@@ -62,6 +67,12 @@ Global
        GlobalSection(NestedProjects) = preSolution
                {2AB542E3-5F90-48CA-9442-32B2780B3E4A} = {1EC5C716-CA52-46FD-A76C-BEF9459E5561}
        EndGlobalSection
+       GlobalSection(ExtensibilityGlobals) = postSolution
+               SolutionGuid = {EE42D93F-9364-4E6D-8D65-A065EEDB5733}
+       EndGlobalSection
+       GlobalSection(Performance) = preSolution
+               HasPerformanceSessions = true
+       EndGlobalSection
        GlobalSection(Performance) = preSolution
                HasPerformanceSessions = true
        EndGlobalSection
index ed908e2..a4bb0ec 100644 (file)
@@ -2,7 +2,6 @@
 
 open System
 open System.Linq
-open System.Drawing
 
 open FSharp.Collections.ParallelSeq
 
@@ -178,7 +177,7 @@ let doAnalysis (img : Image<Bgr, byte>) (name : string) (config : Config) (repor
 /// <param name="reportProgress">An optional function to report progress and/or cancel the process.
 ///     The first call returning 'false' will cancel the analysis.
 ///     The 'int' parameter correspond to the progression from 0 to 100</param>
-/// <returns>'None' if the process has been cancelled or the list of result as (name * cells), 'name' corresponds to the given name<returns>
+/// <return>'None' if the process has been cancelled or the list of result as (name * cells), 'name' corresponds to the given name</return>
 let doMultipleAnalysis (imgs : (string * Config * Image<Bgr, byte>) list) (reportProgress : (int -> bool) option) : (string * AnalysisResult) list option =
     let report (percent : int) : bool =
         match reportProgress with
index a2d9e4f..475e336 100644 (file)
@@ -5,7 +5,6 @@ open System.Collections.Generic
 open System.Drawing
 
 open Emgu.CV
-open Emgu.CV.Structure
 
 open Types
 open Utils
index d0dea6e..65264ad 100644 (file)
@@ -7,7 +7,6 @@ open System.Drawing
 open MathNet.Numerics.LinearAlgebra
 
 open Emgu.CV
-open Emgu.CV.Structure
 
 open Utils
 open Config
index 287cd3e..ea5ef67 100644 (file)
@@ -1,7 +1,6 @@
 module ParasitemiaCore.Granulometry
 
 open System
-open System.IO
 open System.Drawing
 
 open Emgu.CV
@@ -15,6 +14,7 @@ open Utils
 /// <param name="img"></param>
 /// <param name="range">Minimum radius * maximum radius</param>
 /// <param name="scale">le 1.0, to speed up the process.</param>
+/// <param name="useOctagon"></param>
 let findRadiusByClosing (img : Image<Gray, 'TDepth>) (range : int * int) (scale : float) (useOctagon : bool) : int =
     use scaledImg = if scale = 1. then img else img.Resize (scale, CvEnum.Inter.Area)
 
index 2882f4b..51f3354 100644 (file)
@@ -1,6 +1,5 @@
 module ParasitemiaCore.Drawing
 
-open System
 open System.Drawing
 
 open Emgu.CV
index 7c3e6d3..b44c768 100644 (file)
@@ -1,6 +1,5 @@
 module ParasitemiaCore.Edges
 
-open System
 open System.Drawing
 open System.Collections.Generic
 
index 08adfb0..f052271 100644 (file)
@@ -1,8 +1,5 @@
 module ParasitemiaCore.IO
 
-open System
-open System.Drawing
-
 open Emgu.CV
 open Emgu.CV.Structure
 
index fc89047..991cb76 100644 (file)
@@ -1,6 +1,5 @@
 module ParasitemiaCore.ImgTools
 
-open System
 open System.Drawing
 
 open Emgu.CV
index c0276d9..9bb0691 100644 (file)
@@ -1,6 +1,5 @@
 module ParasitemiaCore.KMeans
 
-open System.Collections.Generic
 open System.Drawing
 
 open Emgu.CV
index 03a3869..67c2fb1 100644 (file)
@@ -1,9 +1,6 @@
 module ParasitemiaCore.MatchingEllipses
 
-open System
 open System.Drawing
-open System.Linq
-open System.Collections
 open System.Collections.Generic
 
 open Types
index 2642de5..4309643 100644 (file)
@@ -1,52 +1,10 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\packages\EmguCV.3.1.0.1\build\EmguCV.props" Condition="Exists('..\packages\EmguCV.3.1.0.1\build\EmguCV.props')" />
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+<Project Sdk="Microsoft.NET.Sdk">
+
   <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>0f8a85f4-9328-40c3-b8ff-44fb39ceb01f</ProjectGuid>
     <OutputType>Library</OutputType>
-    <RootNamespace>ParasitemiaCore</RootNamespace>
-    <AssemblyName>ParasitemiaCore</AssemblyName>
-    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
-    <TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion>
-    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
-    <Name>ParasitemiaCore</Name>
-    <TargetFrameworkProfile />
-    <NuGetPackageImportStamp>
-    </NuGetPackageImportStamp>
+    <TargetFramework>net5.0</TargetFramework>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <Tailcalls>false</Tailcalls>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <WarningLevel>3</WarningLevel>
-    <DocumentationFile>bin\Debug\ParasitemiaCore.XML</DocumentationFile>
-    <PlatformTarget>AnyCPU</PlatformTarget>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <Tailcalls>true</Tailcalls>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <WarningLevel>3</WarningLevel>
-    <DocumentationFile>
-    </DocumentationFile>
-    <PlatformTarget>AnyCPU</PlatformTarget>
-  </PropertyGroup>
-  <PropertyGroup>
-    <MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
-  </PropertyGroup>
-  <PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')">
-    <FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
-  </PropertyGroup>
-  <Import Project="$(FSharpTargetsPath)" />
+
   <ItemGroup>
     <Compile Include="AssemblyInfo.fs" />
     <Compile Include="Heap.fs" />
     <Content Include="packages.config" />
     <Content Include="OpenTK.dll.config" />
   </ItemGroup>
+
+  <ItemGroup>
+    <PackageReference Include="Emgu.CV" Version="4.5.1.4349" />
+    <PackageReference Include="FSharp.Collections.ParallelSeq" Version="1.1.4" />
+    <PackageReference Include="MathNet.Numerics.FSharp" Version="4.15.0" />
+  </ItemGroup>
+
   <ItemGroup>
-    <Reference Include="Emgu.CV.UI">
-      <HintPath>..\packages\EmguCV.3.1.0.1\lib\net30\Emgu.CV.UI.dll</HintPath>
-    </Reference>
-    <Reference Include="Emgu.CV.UI.GL">
-      <HintPath>..\packages\EmguCV.3.1.0.1\lib\net30\Emgu.CV.UI.GL.dll</HintPath>
-    </Reference>
-    <Reference Include="Emgu.CV.World">
-      <HintPath>..\packages\EmguCV.3.1.0.1\lib\net30\Emgu.CV.World.dll</HintPath>
-    </Reference>
-    <Reference Include="FSharp.Collections.ParallelSeq">
-      <HintPath>..\packages\FSharp.Collections.ParallelSeq.1.1.3\lib\net45\FSharp.Collections.ParallelSeq.dll</HintPath>
-    </Reference>
-    <Reference Include="FSharp.Core">
-      <HintPath>..\packages\FSharp.Core.4.7.2\lib\net45\FSharp.Core.dll</HintPath>
-    </Reference>
-    <Reference Include="MathNet.Numerics">
-      <HintPath>..\packages\MathNet.Numerics.4.11.0\lib\net461\MathNet.Numerics.dll</HintPath>
-    </Reference>
-    <Reference Include="MathNet.Numerics.FSharp">
-      <HintPath>..\packages\MathNet.Numerics.FSharp.4.11.0\lib\net45\MathNet.Numerics.FSharp.dll</HintPath>
-    </Reference>
-    <Reference Include="mscorlib" />
-    <Reference Include="OpenTK">
-      <HintPath>..\packages\OpenTK.3.2\lib\net20\OpenTK.dll</HintPath>
-    </Reference>
-    <Reference Include="OpenTK.GLControl">
-      <HintPath>..\packages\OpenTK.GLControl.3.1.0\lib\net20\OpenTK.GLControl.dll</HintPath>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.ComponentModel.Composition" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Drawing" />
-    <Reference Include="System.Numerics" />
-    <Reference Include="System.Runtime">
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="System.Runtime.Serialization" />
-    <Reference Include="System.ValueTuple">
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="System.Windows.Forms" />
-    <Reference Include="System.Xml" />
-    <Reference Include="ZedGraph">
-      <HintPath>..\packages\ZedGraph.5.1.7\lib\net35-Client\ZedGraph.dll</HintPath>
-    </Reference>
+    <ProjectReference Include="..\Logger\Logger.fsproj" />
   </ItemGroup>
+
   <ItemGroup>
-    <ProjectReference Include="..\Logger\Logger.fsproj">
-      <Name>Logger</Name>
-      <Project>{a4f183ae-562a-4bad-88e6-658b4ce15dc3}</Project>
-      <Private>True</Private>
-    </ProjectReference>
+    <PackageReference Update="FSharp.Core" Version="5.0.1" />
   </ItemGroup>
-  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
-    <PropertyGroup>
-      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
-    </PropertyGroup>
-    <Error Condition="!Exists('..\packages\EmguCV.3.1.0.1\build\EmguCV.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EmguCV.3.1.0.1\build\EmguCV.props'))" />
-    <Error Condition="!Exists('..\packages\EmguCV.3.1.0.1\build\EmguCV.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EmguCV.3.1.0.1\build\EmguCV.targets'))" />
-  </Target>
-  <Import Project="..\packages\EmguCV.3.1.0.1\build\EmguCV.targets" Condition="Exists('..\packages\EmguCV.3.1.0.1\build\EmguCV.targets')" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
 </Project>
\ No newline at end of file
index b89caa6..c815d86 100644 (file)
@@ -10,7 +10,6 @@ open Utils
 open Histogram
 open Otsu
 open Morpho
-open ImgTools
 
 type Result =
     {
index 8c643b7..d421e22 100644 (file)
@@ -1,12 +1,12 @@
 module ParasitemiaUI.About
 
-open System
 open System.Windows
-open System.Windows.Controls
 open System.Diagnostics
 
+open ParasitemiaUIControls
+
 let showWindow (parent : Window) =
-    let win = Views.AboutWindow ()
+    let win = AboutWindow ()
     win.Owner <- parent
 
     win.Left <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Left) + parent.ActualWidth / 2. - win.Width / 2.
index 9a6047e..43987d1 100644 (file)
@@ -1,25 +1,18 @@
 module ParasitemiaUI.Analysis
 
 open System
-open System.IO
 open System.Linq
 open System.Windows
-open System.Windows.Media
-open System.Windows.Markup
-open System.Windows.Shapes
 open System.Windows.Controls
-open System.Diagnostics
-open Microsoft.Win32 // For the common dialogs.
-
-open Emgu.CV.WPF
 
+open ParasitemiaUIControls
 open ParasitemiaCore.UnitsOfMeasure
 open ParasitemiaCore.Config
 
 open Types
 
 let showWindow (parent : Window) (state : State.State) : bool =
-    let win = Views.AnalysisWindow ()
+    let win = AnalysisWindow ()
     win.Owner <- parent
     win.Left <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Left) + parent.ActualWidth / 2. - win.Width / 2.
     win.Top <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Top) + parent.ActualHeight / 2. - win.Height / 2.
@@ -54,7 +47,7 @@ let showWindow (parent : Window) (state : State.State) : bool =
         win.stackSourceImagesSelection.Children.Clear ()
         let width = int win.stackSourceImagesSelection.ActualWidth
         for srcImg in state.SourceImages do
-            let imageSourceSelection = Views.ImageSourceSelection (Tag = srcImg, Margin = Thickness 3.)
+            let imageSourceSelection = ImageSourceSelection (Tag = srcImg, Margin = Thickness 3.)
             imageSourceSelection.Tag <- srcImg
 
             imageSourceSelection.txtImageNumber.Text <- string srcImg.RomanNum
@@ -95,7 +88,7 @@ let showWindow (parent : Window) (state : State.State) : bool =
     // Get the new parameters for each image. If an error occurs then 'None' is returned and a message box is displayed.
     // The boolean is 'true' if the image is selected (checked).
     let getInputImagesParameters () : (SourceImage * bool * Parameters) list option =
-        let sourceImagesControls = win.stackSourceImagesSelection.Children |> Seq.cast<Views.ImageSourceSelection>
+        let sourceImagesControls = win.stackSourceImagesSelection.Children |> Seq.cast<ImageSourceSelection>
         let parameters =
             seq {
                 for srcImgCtrl in sourceImagesControls do
diff --git a/Parasitemia/ParasitemiaUI/App.config b/Parasitemia/ParasitemiaUI/App.config
deleted file mode 100644 (file)
index 5a363e0..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
-  <startup>
-    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
-  </startup>
-  <runtime>
-    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
-      <dependentAssembly>
-        <assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
-      </dependentAssembly>
-    </assemblyBinding>
-  </runtime>
-</configuration>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUI/BitmapSourceConvert.fs b/Parasitemia/ParasitemiaUI/BitmapSourceConvert.fs
new file mode 100644 (file)
index 0000000..ea41240
--- /dev/null
@@ -0,0 +1,30 @@
+namespace ParasitemiaUI
+
+open System
+open System.Runtime.InteropServices
+open System.Windows
+open System.Windows.Media.Imaging
+
+open Emgu.CV
+
+module BitmapSourceConvert =
+    [<DllImport("gdi32")>]
+    extern int DeleteObject(IntPtr o);
+
+    let ToBitmapSource (image : Image<'TColor, 'TDepth>) : BitmapSource =
+        use source = image.ToBitmap ()
+
+        let ptr : IntPtr = source.GetHbitmap ()
+
+        let bs : BitmapSource =
+            System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap
+                (
+                    ptr,
+                    IntPtr.Zero,
+                    Int32Rect.Empty,
+                    (BitmapSizeOptions.FromEmptyOptions ())
+                )
+
+        DeleteObject ptr |> ignore
+
+        bs
index 8025ebf..02d7979 100644 (file)
@@ -1,12 +1,11 @@
 module ParasitemiaUI.CommandLineArguments
 
-open System
 open System.Windows
-open System.Windows.Controls
-open System.Diagnostics
+
+open ParasitemiaUIControls
 
 let showWindow (parent : Window) =
-    let win = Views.CommandLineArgumentsWindow ()
+    let win = CommandLineArgumentsWindow ()
     win.Owner <- parent
 
     win.Left <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Left) + parent.ActualWidth / 2. - win.Width / 2.
index 2cdc184..697bbef 100644 (file)
@@ -2,19 +2,15 @@
 
 open System
 open System.Windows
-open System.Windows.Media
-open System.Windows.Markup
-open System.Windows.Shapes
-open System.Windows.Controls
-open System.Diagnostics
 
+open ParasitemiaUIControls
 open ParasitemiaCore.Types
 open ParasitemiaCore.UnitsOfMeasure
 
 open Types
 
 let showWindow (parent : Window) : int option =
-    let win = Views.PPICalculatorWindow ()
+    let win = PPICalculatorWindow ()
     win.Owner <- parent
     win.Left <- parent.Left + parent.ActualWidth / 2. - win.Width / 2.
     win.Top <- parent.Top + parent.ActualHeight / 2. - win.Height / 2.
@@ -30,7 +26,7 @@ let showWindow (parent : Window) : int option =
         let { w = w; h = h } = win.cmbSensorSize.SelectedValue :?> SensorSize
         let ratio = h / w
 
-        let parseDouble txt errorMess = match Double.TryParse (txt) with true, value -> Success value | _ -> Fail errorMess
+        let parseDouble (txt : string) (errorMess : string) = match Double.TryParse (txt) with true, value -> Success value | _ -> Fail errorMess
 
         match
             (result {
index f305687..83e54c2 100644 (file)
@@ -5,23 +5,19 @@ open System.IO
 open System.Linq
 open System.Windows
 open System.Windows.Media
-open System.Windows.Markup
-open System.Windows.Shapes
 open System.Windows.Controls
-open System.Diagnostics
 open Microsoft.Win32 // For the common dialogs.
 
-open Emgu.CV.WPF
-
 open Logger
 
+open ParasitemiaUIControls
 open ParasitemiaCore.Config
 open ParasitemiaCore.Utils
 open Types
 
 let run (defaultConfig : Config) (fileToOpen : string option) =
     let app = new Application ()
-    let win = Views.MainWindow ()
+    let win = MainWindow ()
 
     let state = State.State defaultConfig
     let mutable currentScale = 1.
@@ -47,7 +43,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
             )
         )
 
-    let setRBCFrameStyle (srcImg : SourceImage) (rbc : RBC) (frame : Views.RBCFrame) =
+    let setRBCFrameStyle (srcImg : SourceImage) (rbc : RBC) (frame : RBCFrame) =
         frame.Opacity <- if displayHealthy || rbc.setManually || rbc.infected then 1. else 0.
         let color = if rbc.infected then srcImg.InfectedRBCColor else srcImg.HealthyRBCColor
         frame.manuallyAdded.Visibility <- if rbc.setManually then Visibility.Visible else Visibility.Hidden
@@ -60,7 +56,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
     let frameFontSize (averageRBCSize : float) =
         max 1. (averageRBCSize / 8.)
 
-    let RBCFrameFromExisting (srcImg : SourceImage) (rbc : RBC) (frame : Views.RBCFrame) (frameThickness : float) (fontSize : float) : Views.RBCFrame =
+    let createRBCFrameFromExisting (srcImg : SourceImage) (rbc : RBC) (frame : RBCFrame) (frameThickness : float) (fontSize : float) : RBCFrame =
         frame.Visibility <- Visibility.Visible
         frame.Width <- rbc.size.Width
         frame.Height <- rbc.size.Height
@@ -84,7 +80,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
         statusMessageTimer.Stop ()
         statusMessageTimer.Start ()
 
-    let highlightRBCFrame (frame : Views.RBCFrame) (highlight : bool) =
+    let highlightRBCFrame (frame : RBCFrame) (highlight : bool) =
         let rbc = frame.Tag :?> RBC
         if highlight then
             frame.border.StrokeThickness <- 3. * frame.border.StrokeThickness
@@ -145,7 +141,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
             )
 
     let updateViewportPreview () =
-        for preview in win.stackPreviews.Children |> Seq.cast<Views.ImageSourcePreview> do
+        for preview in win.stackPreviews.Children |> Seq.cast<ImageSourcePreview> do
             let srcImg = preview.Tag :?> SourceImage
             if Some srcImg = state.CurrentImage then
                 preview.viewport.Visibility <- Visibility.Visible
@@ -173,7 +169,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
     let rec setAsInfected (srcImg : SourceImage) (rbc : RBC) (infected : bool) =
         state.SetAsInfected rbc infected
         win.canvasCurrentImage.Children
-        |> Seq.cast<Views.RBCFrame>
+        |> Seq.cast<RBCFrame>
         |> Seq.iter (
             fun frame ->
                 if (frame.Tag :?> RBC) = rbc then
@@ -183,8 +179,8 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
         updateCurrentImageInformation ()
         updateGlobalParasitemia ()
 
-    and RBCFrame (srcImg : SourceImage) (rbc : RBC) (frameThickness : float) (fontSize : float) : Views.RBCFrame =
-        let frame = RBCFrameFromExisting srcImg rbc (Views.RBCFrame ()) frameThickness fontSize
+    and createRBCFrame (srcImg : SourceImage) (rbc : RBC) (frameThickness : float) (fontSize : float) : RBCFrame =
+        let frame = createRBCFrameFromExisting srcImg rbc (RBCFrame ()) frameThickness fontSize
         frame.SetValue (Panel.ZIndexProperty, Int32.MaxValue - rbc.num) // To be sure the
         frame.menuRBCSetAsHealthy.Click.AddHandler (fun obj args -> setAsInfected srcImg (frame.Tag :?> RBC) false)
         frame.menuRBCSetAsInfected.Click.AddHandler (fun obj args -> setAsInfected srcImg (frame.Tag :?> RBC) true)
@@ -209,9 +205,9 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
             for rbc in srcImg.RBCs |> List.filter (fun rbc -> displayHealthy || rbc.infected) do
                 let previewInfected =
                     if currentPreview < win.stackRBC.Children.Count then
-                        RBCFrameFromExisting srcImg rbc (win.stackRBC.Children.[currentPreview] :?> Views.RBCFrame) 1. 12.
+                        createRBCFrameFromExisting srcImg rbc (win.stackRBC.Children.[currentPreview] :?> RBCFrame) 1. 12.
                     else
-                        let f = RBCFrame srcImg rbc 1. 12.
+                        let f = createRBCFrame srcImg rbc 1. 12.
                         f.MouseLeftButtonUp.AddHandler (fun obj args -> zoomToRBC (f.Tag :?> RBC))
                         win.stackRBC.Children.Add f |> ignore
                         f
@@ -236,9 +232,9 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
             for rbc in srcImg.RBCs do
                 let frame =
                     if currentCanvas < win.canvasCurrentImage.Children.Count then
-                        RBCFrameFromExisting srcImg rbc (win.canvasCurrentImage.Children.[currentCanvas] :?> Views.RBCFrame) strokeThickness fontSize
+                        createRBCFrameFromExisting srcImg rbc (win.canvasCurrentImage.Children.[currentCanvas] :?> RBCFrame) strokeThickness fontSize
                     else
-                        let f = RBCFrame srcImg rbc strokeThickness fontSize
+                        let f = createRBCFrame srcImg rbc strokeThickness fontSize
                         win.canvasCurrentImage.Children.Add f |> ignore
                         f
 
@@ -303,7 +299,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
 
             // Highlight the preview.
             win.stackPreviews.Children
-            |> Seq.cast<Views.ImageSourcePreview>
+            |> Seq.cast<ImageSourcePreview>
             |> Seq.iter (fun preview -> preview.border.BorderThickness <- Thickness (if preview.Tag = (srcImg :> Object) then 3. else 0.))
 
             win.canvasCurrentImage.Height <- float srcImg.Img.Height
@@ -328,7 +324,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
             updateCurrentImage ()
 
     let addPreview (srcImg : SourceImage) =
-        let imgCtrl = Views.ImageSourcePreview (Margin = Thickness 3.)
+        let imgCtrl = ImageSourcePreview (Margin = Thickness 3.)
 
         imgCtrl.menuRemoveImage.Click.AddHandler (
             fun obj args ->
@@ -342,7 +338,7 @@ let run (defaultConfig : Config) (fileToOpen : string option) =
                 updateGlobalParasitemia ()
 
                 // Update image numbers.
-                win.stackPreviews.Children |> Seq.cast<Views.ImageSourcePreview> |> Seq.iter (fun imgPreview -> imgPreview.txtImageNumber.Text <- (imgPreview.Tag :?> SourceImage).RomanNum)
+                win.stackPreviews.Children |> Seq.cast<ImageSourcePreview> |> Seq.iter (fun imgPreview -> imgPreview.txtImageNumber.Text <- (imgPreview.Tag :?> SourceImage).RomanNum)
         )
 
         imgCtrl.Tag <- srcImg
index 2ca9b50..3e7e22f 100644 (file)
@@ -1,91 +1,13 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\packages\EmguCV.3.1.0.1\build\EmguCV.props" Condition="Exists('..\packages\EmguCV.3.1.0.1\build\EmguCV.props')" />
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+<Project Sdk="Microsoft.NET.Sdk">
+
   <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>70838e65-f211-44fc-b28f-0ed1ca6e850f</ProjectGuid>
     <OutputType>WinExe</OutputType>
-    <RootNamespace>ParasitemiaUI</RootNamespace>
-    <AssemblyName>ParasitemiaUI</AssemblyName>
-    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
-    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
-    <TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion>
-    <Name>ParasitemiaUI</Name>
-    <NuGetPackageImportStamp>
-    </NuGetPackageImportStamp>
-    <TargetFrameworkProfile />
-    <Win32Resource>resources.res</Win32Resource>
+    <TargetFramework>net5.0-windows</TargetFramework>
+    <UseWPF>true</UseWPF>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <Tailcalls>false</Tailcalls>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <WarningLevel>3</WarningLevel>
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DocumentationFile>bin\Debug\ParasitemiaUI.XML</DocumentationFile>
-    <Prefer32Bit>false</Prefer32Bit>
-    <StartArguments>--folder "../../../Images/debug" --output "../../../Images/output" --debug</StartArguments>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugGUI|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <Tailcalls>false</Tailcalls>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <WarningLevel>3</WarningLevel>
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DocumentationFile>bin\Debug\ParasitemiaUI.XML</DocumentationFile>
-    <Prefer32Bit>false</Prefer32Bit>
-    <StartArguments>--output "../../../Images/output" --debug</StartArguments>
-    <OutputPath>bin\DebugGUI\</OutputPath>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <Tailcalls>true</Tailcalls>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <WarningLevel>1</WarningLevel>
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DocumentationFile>
-    </DocumentationFile>
-    <Prefer32Bit>false</Prefer32Bit>
-    <StartArguments>--folder "../../../Images/release" --output "../../../Images/output" --debug</StartArguments>
-  </PropertyGroup>
-  <PropertyGroup>
-    <MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
-  </PropertyGroup>
-  <PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')">
-    <FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
-  </PropertyGroup>
-  <Import Project="$(FSharpTargetsPath)" />
+
   <ItemGroup>
     <Compile Include="AssemblyInfo.fs" />
-    <Resource Include="Resources\chuv_logo.png" />
-    <Resource Include="Resources\hes-so_logo.png" />
-    <Resource Include="Resources\icon.ico" />
-    <Resource Include="XAML\ImageSourcePreview.xaml" />
-    <Compile Include="XAML\ImageSourcePreview.xaml.fs" />
-    <Resource Include="XAML\ImageSourceSelection.xaml" />
-    <Compile Include="XAML\ImageSourceSelection.xaml.fs" />
-    <Resource Include="XAML\RBCFrame.xaml" />
-    <Compile Include="XAML\RBCFrame.xaml.fs" />
-    <Resource Include="XAML\PPICalculatorWindow.xaml" />
-    <Compile Include="XAML\PPICalculatorWindow.xaml.fs" />
-    <Resource Include="XAML\AnalysisWindow.xaml" />
-    <Compile Include="XAML\AnalysisWindow.xaml.fs" />
-    <Resource Include="XAML\CommandLineArgumentsWindow.xaml" />
-    <Compile Include="XAML\CommandLineArgumentsWindow.xaml.fs" />
-    <Resource Include="XAML\AboutWindow.xaml" />
-    <Compile Include="XAML\AboutWindow.xaml.fs" />
-    <Resource Include="XAML\MainWindow.xaml" />
-    <Compile Include="XAML\MainWindow.xaml.fs" />
     <Compile Include="Types.fs" />
     <Compile Include="Utils.fs" />
     <Compile Include="SourceImage.fs" />
     <Compile Include="State.fs" />
     <Compile Include="Export.fs" />
     <Compile Include="DPICalculator.fs" />
+    <Compile Include="BitmapSourceConvert.fs" />
     <Compile Include="Analysis.fs" />
     <Compile Include="CommandLineArguments.fs" />
     <Compile Include="About.fs" />
     <Compile Include="GUI.fs" />
-    <None Include="App.config" />
     <Content Include="packages.config" />
     <Compile Include="Program.fs" />
     <Content Include="License-LGPL.txt" />
     <Content Include="OpenTK.dll.config" />
   </ItemGroup>
+
   <ItemGroup>
-    <Reference Include="Emgu.CV.UI">
-      <HintPath>..\packages\EmguCV.3.1.0.1\lib\net30\Emgu.CV.UI.dll</HintPath>
-    </Reference>
-    <Reference Include="Emgu.CV.UI.GL">
-      <HintPath>..\packages\EmguCV.3.1.0.1\lib\net30\Emgu.CV.UI.GL.dll</HintPath>
-    </Reference>
-    <Reference Include="Emgu.CV.World">
-      <HintPath>..\packages\EmguCV.3.1.0.1\lib\net30\Emgu.CV.World.dll</HintPath>
-    </Reference>
-    <Reference Include="FSharp.Core">
-      <HintPath>..\packages\FSharp.Core.4.7.2\lib\net45\FSharp.Core.dll</HintPath>
-    </Reference>
-    <Reference Include="FSharp.ViewModule">
-      <HintPath>..\packages\FSharp.ViewModule.Core.1.0.7.0\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\FSharp.ViewModule.dll</HintPath>
-    </Reference>
-    <Reference Include="FsXaml.Wpf">
-      <HintPath>..\packages\FsXaml.Wpf.3.1.6\lib\net45\FsXaml.Wpf.dll</HintPath>
-    </Reference>
-    <Reference Include="FsXaml.Wpf.TypeProvider">
-      <HintPath>..\packages\FsXaml.Wpf.3.1.6\lib\net45\FsXaml.Wpf.TypeProvider.dll</HintPath>
-    </Reference>
-    <Reference Include="mscorlib" />
-    <Reference Include="Newtonsoft.Json">
-      <HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
-    </Reference>
-    <Reference Include="OpenTK">
-      <HintPath>..\packages\OpenTK.3.2\lib\net20\OpenTK.dll</HintPath>
-    </Reference>
-    <Reference Include="OpenTK.GLControl">
-      <HintPath>..\packages\OpenTK.GLControl.3.1.0\lib\net20\OpenTK.GLControl.dll</HintPath>
-    </Reference>
-    <Reference Include="PresentationCore" />
-    <Reference Include="PresentationFramework" />
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="System.Data.Linq" />
-    <Reference Include="System.Drawing" />
-    <Reference Include="System.IO.Compression" />
-    <Reference Include="System.IO.Compression.FileSystem" />
-    <Reference Include="System.Numerics" />
-    <Reference Include="System.ValueTuple">
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="System.Windows.Forms" />
-    <Reference Include="System.Windows.Interactivity">
-      <HintPath>..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="System.Xaml" />
-    <Reference Include="System.Xml" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="WindowsBase" />
-    <Reference Include="ZedGraph">
-      <HintPath>..\packages\ZedGraph.5.1.7\lib\net35-Client\ZedGraph.dll</HintPath>
-    </Reference>
+    <PackageReference Include="Emgu.CV" Version="4.5.1.4349" />
+    <PackageReference Include="Emgu.CV.Bitmap" Version="4.5.1.4349" />
+    <PackageReference Include="Emgu.CV.runtime.windows" Version="4.5.1.4349" />
+    <PackageReference Include="FSharp.ViewModule.Core" Version="1.0.7" />
+    <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
+    <PackageReference Include="System.Drawing.Common" Version="5.0.2" />
   </ItemGroup>
+
   <ItemGroup>
-    <ProjectReference Include="..\Logger\Logger.fsproj">
-      <Name>Logger</Name>
-      <Project>{a4f183ae-562a-4bad-88e6-658b4ce15dc3}</Project>
-      <Private>True</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\ParasitemiaCore\ParasitemiaCore.fsproj">
-      <Name>ParasitemiaCore</Name>
-      <Project>{0f8a85f4-9328-40c3-b8ff-44fb39ceb01f}</Project>
-      <Private>True</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\WPF\WPF.csproj">
-      <Name>WPF</Name>
-      <Project>{314fd78e-870e-4794-bb16-ea4586f2abdb}</Project>
-      <Private>True</Private>
-    </ProjectReference>
+    <ProjectReference Include="..\Logger\Logger.fsproj" />
+    <ProjectReference Include="..\ParasitemiaCore\ParasitemiaCore.fsproj" />
+    <ProjectReference Include="..\ParasitemiaUIControls\ParasitemiaUIControls.csproj" />
   </ItemGroup>
-  <PropertyGroup>
-    <PostBuildEvent>
-    </PostBuildEvent>
-  </PropertyGroup>
-  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
-    <PropertyGroup>
-      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
-    </PropertyGroup>
-    <Error Condition="!Exists('..\packages\EmguCV.3.1.0.1\build\EmguCV.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EmguCV.3.1.0.1\build\EmguCV.props'))" />
-    <Error Condition="!Exists('..\packages\EmguCV.3.1.0.1\build\EmguCV.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EmguCV.3.1.0.1\build\EmguCV.targets'))" />
-  </Target>
-  <Import Project="..\packages\EmguCV.3.1.0.1\build\EmguCV.targets" Condition="Exists('..\packages\EmguCV.3.1.0.1\build\EmguCV.targets')" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
+
+  <ItemGroup>
+    <PackageReference Update="FSharp.Core" Version="5.0.1" />
+  </ItemGroup>
+
 </Project>
\ No newline at end of file
index 2220953..18e9d6a 100644 (file)
@@ -2,7 +2,6 @@
 module ParasitemiaUI.PiaZ
 
 open System
-open System.Windows
 open System.IO
 open System.IO.Compression
 
@@ -10,7 +9,6 @@ open Emgu.CV
 open Emgu.CV.Structure
 
 open Newtonsoft.Json
-open Newtonsoft.Json.Converters
 
 open Types
 
@@ -100,7 +98,8 @@ let updateDocumentData (fromVersion : int) (toVersion : int) (data : DocumentDat
 /// <summary>
 /// Load document from a give file path.
 /// </summary>
-/// <param name="filePath"></param>
+/// <param name="filePath">Path to the PiaZ file</param>
+/// <param name="defaultConfig"></param>
 /// <exception cref="System.IOException">If the file cannot be read</exception>
 let load (filePath : string) (defaultConfig : ParasitemiaCore.Config.Config) : DocumentData =
     use file = ZipFile.Open (filePath, ZipArchiveMode.Read)
@@ -118,7 +117,7 @@ let load (filePath : string) (defaultConfig : ParasitemiaCore.Config.Config) : D
                     for imgEntry in file.Entries do
                         if imgEntry.Name.EndsWith (imageExtension) then
                             use bitmap = new System.Drawing.Bitmap (imgEntry.Open (), false)
-                            let img = new Image<Bgr, byte> (bitmap)
+                            let img = bitmap.ToImage<Bgr, byte> ()
                             imgNum <- imgNum + 1
                             let imgJSONEntry = file.GetEntry (imgEntry.Name + ".json")
                             use imgJSONFileReader = new StreamReader (imgJSONEntry.Open ())
diff --git a/Parasitemia/ParasitemiaUI/Resources/chuv_logo.png b/Parasitemia/ParasitemiaUI/Resources/chuv_logo.png
deleted file mode 100644 (file)
index e062ad8..0000000
Binary files a/Parasitemia/ParasitemiaUI/Resources/chuv_logo.png and /dev/null differ
diff --git a/Parasitemia/ParasitemiaUI/Resources/hes-so_logo.png b/Parasitemia/ParasitemiaUI/Resources/hes-so_logo.png
deleted file mode 100644 (file)
index 7900495..0000000
Binary files a/Parasitemia/ParasitemiaUI/Resources/hes-so_logo.png and /dev/null differ
diff --git a/Parasitemia/ParasitemiaUI/Resources/icon.ico b/Parasitemia/ParasitemiaUI/Resources/icon.ico
deleted file mode 100644 (file)
index 147e3a8..0000000
Binary files a/Parasitemia/ParasitemiaUI/Resources/icon.ico and /dev/null differ
index 7b3de18..7f5c245 100644 (file)
@@ -1,7 +1,6 @@
 namespace ParasitemiaUI
 
 open System
-open System.Windows
 open System.Windows.Media
 
 open Emgu.CV
index 3a3cf56..1da2dea 100644 (file)
@@ -1,11 +1,6 @@
 module ParasitemiaUI.Types
 
-open System
 open System.Windows
-open System.Windows.Media
-
-open Emgu.CV
-open Emgu.CV.Structure
 
 open Newtonsoft.Json
 
@@ -62,5 +57,3 @@ let defaultSensorSizes =
         { w = 8.8<mm>;  h = 6.6<mm>;  label = "2/3″" }
         { w = 13.2<mm>; h = 8.8<mm>;  label = "1″" }
     ]
-
-
diff --git a/Parasitemia/ParasitemiaUI/XAML/AboutWindow.xaml b/Parasitemia/ParasitemiaUI/XAML/AboutWindow.xaml
deleted file mode 100644 (file)
index d08f4c4..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<Window 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"
-        mc:Ignorable="d"
-        x:Name="AboutWindow" Height="220" Width="280" MinHeight="220" MinWidth="280" Title="About" Icon="pack://application:,,,/Resources/icon.ico" ResizeMode="NoResize">
-   <Grid Margin="3">
-      <Grid.RowDefinitions>
-         <RowDefinition Height="Auto"/>
-         <RowDefinition Height="Auto"/>
-         <RowDefinition/>
-      </Grid.RowDefinitions>
-      <Image HorizontalAlignment="Left" Height="64" VerticalAlignment="Top" Width="64" Margin="6" Source="pack://application:,,,/Resources/icon.ico"/>
-      <TextBlock x:Name="txtAbout" HorizontalAlignment="Left" Margin="20,6" Grid.Row="1" TextWrapping="Wrap">
-         <Bold FontSize="14.667">Parasitemia </Bold>
-         <LineBreak />
-         <Hyperlink x:Name="linkHESSO" NavigateUri="http://www.hes-so.ch" >HES-SO</Hyperlink> /
-         <Hyperlink x:Name="linkCHUV" NavigateUri="http://www.chuv.ch/" >CHUV</Hyperlink>
-         <LineBreak />
-         <Hyperlink x:Name="linkGBurri" NavigateUri="mailto:greg.burri@gmail.com"> Grégory Burri</Hyperlink>
-      </TextBlock>
-      <Button x:Name="butClose" Content="Close" HorizontalAlignment="Right" Margin="3" VerticalAlignment="Bottom" Width="75" Grid.Row="2" Height="20"/>
-   </Grid>
-</Window>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUI/XAML/AboutWindow.xaml.fs b/Parasitemia/ParasitemiaUI/XAML/AboutWindow.xaml.fs
deleted file mode 100644 (file)
index ed9130d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace ParasitemiaUI.Views
-
-open FsXaml
-
-type AboutWindow = XAML<"XAML/AboutWindow.xaml">
-
diff --git a/Parasitemia/ParasitemiaUI/XAML/AnalysisWindow.xaml b/Parasitemia/ParasitemiaUI/XAML/AnalysisWindow.xaml
deleted file mode 100644 (file)
index 3f3686e..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<Window 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"
-        mc:Ignorable="d"
-        x:Name="AnalysisWindow" Height="453" Width="515" MinHeight="100" MinWidth="100" Title="Analysis" Icon="pack://application:,,,/Resources/icon.ico">
-   <Grid>
-      <Grid.RowDefinitions>
-         <RowDefinition Height="50*"/>
-         <RowDefinition Height="30"/>
-         <RowDefinition Height="20*"/>
-         <RowDefinition Height="Auto"/>
-      </Grid.RowDefinitions>
-      <ScrollViewer x:Name="scrollImagesSourceSelection" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden" Grid.Row="0" Margin="3" >
-         <StackPanel x:Name="stackSourceImagesSelection" />
-      </ScrollViewer>
-      <ProgressBar x:Name="progress" Grid.Row="1" Margin="3" Minimum="0" Maximum="100" />
-      <ScrollViewer x:Name="scrollLog" Grid.Row="2" Margin="3" HorizontalScrollBarVisibility="Auto">
-         <TextBlock x:Name="textLog" />
-      </ScrollViewer>
-      <Grid Grid.Row="3">
-         <Grid.ColumnDefinitions>
-            <ColumnDefinition/>
-            <ColumnDefinition/>
-         </Grid.ColumnDefinitions>
-         <Button x:Name="butStart" Content="Start analysis"  Margin="3" Grid.Column="0"/>
-         <Button x:Name="butClose" Content="Close"  Margin="3" Grid.Column="1"/>
-      </Grid>
-   </Grid>
-</Window>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUI/XAML/AnalysisWindow.xaml.fs b/Parasitemia/ParasitemiaUI/XAML/AnalysisWindow.xaml.fs
deleted file mode 100644 (file)
index 07d9573..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace ParasitemiaUI.Views
-
-open FsXaml
-
-type AnalysisWindow = XAML<"XAML/AnalysisWindow.xaml">
-
diff --git a/Parasitemia/ParasitemiaUI/XAML/CommandLineArgumentsWindow.xaml b/Parasitemia/ParasitemiaUI/XAML/CommandLineArgumentsWindow.xaml
deleted file mode 100644 (file)
index 8952ea3..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<Window 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"
-        mc:Ignorable="d"
-        x:Name="CommandLineArgumentsWindow" Height="420" Width="620" Title="Command Line Arguments" Icon="pack://application:,,,/Resources/icon.ico" ResizeMode="CanResizeWithGrip">
-   <Grid Margin="3">
-        <Grid.RowDefinitions>
-            <RowDefinition Height="Auto"/>
-            <RowDefinition Height="*"/>
-            <RowDefinition Height="Auto"/>
-      </Grid.RowDefinitions>
-        <TextBlock Margin="3">Parasitemia can be launched via a command line, here are the possible arguments</TextBlock>
-        <TextBox x:Name="txtCommandLineArguments" Margin="6" Grid.Row="1" TextWrapping="Wrap" FontFamily="Courier New" FontSize="11" IsReadOnly="True" />
-        <Button x:Name="butClose" Content="Close" HorizontalAlignment="Right" Margin="3" VerticalAlignment="Bottom" Width="75" Grid.Row="2" Height="20"/>
-   </Grid>
-</Window>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUI/XAML/CommandLineArgumentsWindow.xaml.fs b/Parasitemia/ParasitemiaUI/XAML/CommandLineArgumentsWindow.xaml.fs
deleted file mode 100644 (file)
index 716cb63..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace ParasitemiaUI.Views
-
-open FsXaml
-
-type CommandLineArgumentsWindow = XAML<"XAML/CommandLineArgumentsWindow.xaml">
-
diff --git a/Parasitemia/ParasitemiaUI/XAML/ImageSourcePreview.xaml b/Parasitemia/ParasitemiaUI/XAML/ImageSourcePreview.xaml
deleted file mode 100644 (file)
index ae8f5dd..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<UserControl
-               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:fsxaml="clr-namespace:FsXaml;assembly=FsXaml.Wpf"
-      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-      mc:Ignorable="d" d:DesignWidth="119.223" d:DesignHeight="84.911"
-               >
-   <Border x:Name="border" ClipToBounds="True" BorderBrush="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}">
-      <Grid x:Name="grid">
-         <Grid.ContextMenu>
-            <ContextMenu>
-               <MenuItem x:Name="menuRemoveImage" Header="_Remove image"  />
-            </ContextMenu>
-         </Grid.ContextMenu>
-         <Image x:Name="imagePreview" />
-         <Border HorizontalAlignment="Right" VerticalAlignment="Bottom" Background="#4C000000" Margin="0,0,3,3" CornerRadius="5" >
-            <TextBlock x:Name="txtImageNumber" Padding="2" Text="42" Foreground="White" />
-         </Border>
-         <Rectangle x:Name="viewport" Margin="24,30,71,26" Stroke="#BFFFFF00" RenderTransformOrigin="0.5,0.5" Visibility="Hidden"/>
-      </Grid>
-   </Border>
-</UserControl>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUI/XAML/ImageSourcePreview.xaml.fs b/Parasitemia/ParasitemiaUI/XAML/ImageSourcePreview.xaml.fs
deleted file mode 100644 (file)
index fb32ba8..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace ParasitemiaUI.Views
-
-open System
-open System.Windows
-open System.Windows.Data
-open System.Windows.Input
-
-open ViewModule.FSharp
-open FsXaml
-
-type ImageSourcePreview = XAML<"XAML/ImageSourcePreview.xaml">
diff --git a/Parasitemia/ParasitemiaUI/XAML/ImageSourceSelection.xaml b/Parasitemia/ParasitemiaUI/XAML/ImageSourceSelection.xaml
deleted file mode 100644 (file)
index 39b293d..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<UserControl
-               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:fsxaml="clr-namespace:FsXaml;assembly=FsXaml.Wpf"
-      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-      mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="120"
-               >
-   <UserControl.Background>
-      <SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ControlColorKey}}"/>
-   </UserControl.Background>
-   <Grid x:Name="gridMain">
-      <Grid.ColumnDefinitions>
-         <ColumnDefinition Width="100"/>
-         <ColumnDefinition/>
-      </Grid.ColumnDefinitions>
-      <Grid x:Name="gridImage" Grid.ColumnSpan="1" VerticalAlignment="Top">
-         <Image x:Name="imagePreview" />
-         <CheckBox x:Name="chkSelection" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="3,3,0,0"/>
-         <Border HorizontalAlignment="Right" VerticalAlignment="Bottom" Background="#4C000000" Margin="0,0,3,3" CornerRadius="5" >
-            <TextBlock x:Name="txtImageNumber" Padding="2" Text="42" Foreground="White" />
-         </Border>
-         <Rectangle x:Name="viewport" Margin="24,30,71,26" Stroke="#BFFFFF00" RenderTransformOrigin="0.5,0.5" Visibility="Hidden"/>
-      </Grid>
-      <Grid Grid.Column="1">
-         <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="Auto"/>
-            <ColumnDefinition/>
-         </Grid.ColumnDefinitions>
-         <Grid.RowDefinitions>
-            <RowDefinition Height="Auto"/>
-            <RowDefinition Height="Auto"/>
-            <RowDefinition Height="1*"/>
-         </Grid.RowDefinitions>
-         <Label Content="Last analysis" Grid.Column="0" Grid.Row="0" Margin="10,0,3,0" />
-         <Label Content="Resolution [PPI]" Grid.Column="0" Grid.Row="1" Margin="10,0,3,0" />
-         <Label x:Name="lblDateLastAnalysis" Grid.Column="1" Margin="3,0,3,0"/>
-         <Grid Grid.Column="1" Grid.Row="1">
-            <Grid.ColumnDefinitions>
-               <ColumnDefinition/>
-               <ColumnDefinition Width="Auto"/>
-               <ColumnDefinition Width="Auto"/>
-            </Grid.ColumnDefinitions>
-            <TextBox x:Name="txtResolution" Margin="3" Text="" Grid.Column="0" />
-            <Button x:Name="butDefaultResolutions" Content="Predefined values" Grid.Column="1" Margin="3">
-               <Button.ContextMenu>
-                  <ContextMenu x:Name="predefinedValuesMenu">
-                     <!-- MenuItem x:Name="menuZoom50X" Header="50X: 230'000 PPI" />
-                     <MenuItem x:Name="menuZoom100X" Header="100X: 460'000 PPI" / -->
-                  </ContextMenu>
-               </Button.ContextMenu>
-               <Button.Style>
-                  <Style TargetType="{x:Type Button}">
-                     <Style.Triggers>
-                        <EventTrigger RoutedEvent="Click">
-                           <EventTrigger.Actions>
-                              <BeginStoryboard>
-                                 <Storyboard>
-                                    <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="ContextMenu.IsOpen">
-                                       <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="True"/>
-                                    </BooleanAnimationUsingKeyFrames>
-                                 </Storyboard>
-                              </BeginStoryboard>
-                           </EventTrigger.Actions>
-                        </EventTrigger>
-                     </Style.Triggers>
-                  </Style>
-               </Button.Style>
-            </Button>
-            <Button x:Name="butPPICalculator" Content="PPI calculator" Grid.Column="2" Margin="3" />
-         </Grid>
-      </Grid>
-   </Grid>
-</UserControl>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUI/XAML/ImageSourceSelection.xaml.fs b/Parasitemia/ParasitemiaUI/XAML/ImageSourceSelection.xaml.fs
deleted file mode 100644 (file)
index 300118e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace ParasitemiaUI.Views
-
-open System
-open System.Windows
-open System.Windows.Data
-open System.Windows.Input
-
-open ViewModule.FSharp
-open FsXaml
-
-type ImageSourceSelection = XAML<"XAML/ImageSourceSelection.xaml">
diff --git a/Parasitemia/ParasitemiaUI/XAML/MainWindow.xaml b/Parasitemia/ParasitemiaUI/XAML/MainWindow.xaml
deleted file mode 100644 (file)
index ac125de..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-<Window 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"
-        mc:Ignorable="d"
-        x:Name="MainWindow" Height="700" Width="1000" MinHeight="300" MinWidth="400" Title="Parasitemia" Icon="pack://application:,,,/Resources/icon.ico" ResizeMode="CanResizeWithGrip">
-   <DockPanel x:Name="dockPanelMain" LastChildFill="True">
-      <Menu DockPanel.Dock="Top">
-         <MenuItem Header="_File">
-            <MenuItem x:Name="menuNew" Header="_New" InputGestureText="Ctrl+N" />
-            <MenuItem x:Name="menuOpen" Header="_Open" InputGestureText="Ctrl+O" />
-            <MenuItem x:Name="menuSave" Header="_Save" InputGestureText="Ctrl+S" />
-            <MenuItem x:Name="menuSaveAs" Header="Save _As..." InputGestureText="Ctrl+Shift+S" />
-            <Separator />
-            <MenuItem x:Name="menuAddSourceImage" Header="_Import Images..." InputGestureText="Ctrl+A" />
-            <Separator />
-            <MenuItem x:Name="menuExportResults" Header="E_xport Results As Text..." InputGestureText="Ctrl+E" />
-            <Separator />
-            <MenuItem x:Name="menuExit" Header="_Exit" />
-         </MenuItem>
-         <MenuItem x:Name="menuAnalysis" Header="_Analysis">
-            <MenuItem x:Name="menuStartAnalysis" Header="_Show Analysis Window" InputGestureText="Ctrl+Y" />
-         </MenuItem>
-         <MenuItem x:Name="menuView" Header="_View">
-            <MenuItem x:Name="menuHightlightRBC" Header="_Highlight All Erythrocytes" IsCheckable="True" InputGestureText="Ctrl+H" />
-         </MenuItem>
-         <MenuItem x:Name="menuHelp" Header="_Help">
-            <MenuItem x:Name="menuCommandLineArguments" Header="_Command Line Arguments" />
-            <MenuItem x:Name="menuAbout" Header="_About" />
-         </MenuItem>
-      </Menu>
-      <StatusBar DockPanel.Dock="Bottom" >
-         <StatusBarItem>
-            <TextBlock Name="txtDocumentStatus" />
-         </StatusBarItem>
-         <StatusBarItem>
-            <TextBlock Name="txtMessageStatus" />
-         </StatusBarItem>
-      </StatusBar>
-      <Grid x:Name="gridMain">
-         <Grid.RowDefinitions>
-            <RowDefinition Height="Auto"/>
-            <RowDefinition/>
-         </Grid.RowDefinitions>
-         <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="180" />
-            <ColumnDefinition/>
-         </Grid.ColumnDefinitions>
-         <Grid x:Name="gridGlobalInfo" Grid.ColumnSpan="2" Margin="3,3,3,3" >
-            <Grid.ColumnDefinitions>
-               <ColumnDefinition Width="101"/>
-               <ColumnDefinition Width="21"/>
-               <ColumnDefinition/>
-            </Grid.ColumnDefinitions>
-            <Grid.RowDefinitions>
-               <RowDefinition Height="Auto"/>
-               <RowDefinition Height="Auto"/>
-            </Grid.RowDefinitions>
-            <Label x:Name="lblPatient" Margin="10,0,3,0 " Content="Patient ID" Grid.ColumnSpan="2"/>
-            <Label x:Name="lblGlobalParasitemia" Margin="10,0,3,0" Content="Global parasitemia" Grid.Row="1" Grid.ColumnSpan="2" />
-            <TextBox x:Name="txtPatient" Grid.Column="2" Margin="3,4,10,4" TextWrapping="Wrap" VerticalAlignment="Center" />
-            <Border BorderThickness="1" VerticalAlignment="Center" Margin="3,4,10,4" BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" Grid.Column="2" Grid.Row="1" >
-               <TextBlock x:Name="txtGlobalParasitemia" Margin="1" TextWrapping="Wrap"  />
-            </Border>
-         </Grid>
-         <Border BorderBrush="Black" BorderThickness="0"  Margin="3" Grid.Row="1" >
-            <ScrollViewer x:Name="scrollPreviews" VerticalScrollBarVisibility="Auto" >
-               <StackPanel x:Name="stackPreviews" />
-            </ScrollViewer>
-         </Border>
-         <Grid Grid.Column="2" Grid.Row="2">
-            <Grid.RowDefinitions>
-               <RowDefinition Height="100"/>
-               <RowDefinition/>
-               <RowDefinition Height="Auto"/>
-            </Grid.RowDefinitions>
-            <ScrollViewer x:Name="scrollViewCurrentImage" Grid.Row="1" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible" MinHeight="100" MinWidth="100" Background="#FF3E3E3E">
-               <Border x:Name="borderCurrentImage" BorderBrush="Transparent">
-                  <Canvas x:Name="canvasCurrentImage" Height="100" Width="100" />
-               </Border>
-            </ScrollViewer>
-            <Border Grid.Row="1" x:Name="imgLogos">
-               <Grid>
-                  <Grid.RowDefinitions>
-                     <RowDefinition Height="1*"/>
-                     <RowDefinition Height="Auto"/>
-                     <RowDefinition Height="Auto"/>
-                     <RowDefinition Height="1*"/>
-                  </Grid.RowDefinitions>
-                  <Image Grid.Row="1" Source="pack://application:,,,/Resources/chuv_logo.png" Stretch="None" Panel.ZIndex="1" Margin="0,0,0,10" />
-                  <Image Grid.Row="2" Source="pack://application:,,,/Resources/hes-so_logo.png" Stretch="None" Panel.ZIndex="1" Margin="0,10,0,0" />
-               </Grid>
-            </Border>
-            <ScrollViewer x:Name="scrollRBC" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Visible" Grid.RowSpan="1"  Margin="3">
-               <StackPanel x:Name="stackRBC" Orientation="Horizontal" />
-            </ScrollViewer>
-            <Grid x:Name="gridImageInformation" Grid.Row="2">
-               <Grid.ColumnDefinitions>
-                  <ColumnDefinition Width="1*"/>
-                  <ColumnDefinition Width="1*"/>
-               </Grid.ColumnDefinitions>
-               <Grid.RowDefinitions>
-                  <RowDefinition Height="Auto" />
-                  <RowDefinition Height="1*" />
-               </Grid.RowDefinitions>
-               <Grid Grid.ColumnSpan="2" Grid.Row="0" Margin="0,3,3,0">
-                  <Grid.ColumnDefinitions>
-                     <ColumnDefinition Width="Auto"/>
-                     <ColumnDefinition Width="1*"/>
-                  </Grid.ColumnDefinitions>
-                  <Label Content="Image name" Grid.Column="0"></Label>
-                  <TextBox x:Name="txtImageName" Grid.Column="1" VerticalAlignment="Center"> </TextBox>
-               </Grid>
-               <TextBlock x:Name="txtImageInformation1" TextWrapping="Wrap" Margin="3" Grid.Column="0" Grid.Row="1" />
-               <TextBlock x:Name="txtImageInformation2" TextWrapping="Wrap" Margin="3" Grid.Column="1" Grid.Row="1" />
-            </Grid>
-         </Grid>
-      </Grid>
-   </DockPanel>
-</Window>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUI/XAML/MainWindow.xaml.fs b/Parasitemia/ParasitemiaUI/XAML/MainWindow.xaml.fs
deleted file mode 100644 (file)
index adbfff5..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace ParasitemiaUI.Views
-
-open FsXaml
-
-type MainWindow = XAML<"XAML/MainWindow.xaml">
-
diff --git a/Parasitemia/ParasitemiaUI/XAML/NumericUpDown.xaml b/Parasitemia/ParasitemiaUI/XAML/NumericUpDown.xaml
deleted file mode 100644 (file)
index ae20a5b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<UserControl
-               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"
-      mc:Ignorable="d" d:DesignWidth="259.5" d:DesignHeight="45.5"
-               >
-   <Grid>
-      <Grid.RowDefinitions>
-         <RowDefinition />
-         <RowDefinition />
-      </Grid.RowDefinitions>
-      <Grid.ColumnDefinitions>
-         <ColumnDefinition Width="*" />
-         <ColumnDefinition Width="Auto" />
-      </Grid.ColumnDefinitions>
-      <Button x:Name="upButton" Grid.Column="1" Content="^"/>
-      <Button x:Name="downButton" Grid.Column="1" Grid.Row="1" Content="v"/>
-      <TextBox x:Name="input" Grid.RowSpan="2" />
-   </Grid>
-</UserControl>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUI/XAML/NumericUpDown.xaml.fs b/Parasitemia/ParasitemiaUI/XAML/NumericUpDown.xaml.fs
deleted file mode 100644 (file)
index 9f1394d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-namespace ParasitemiaUI.Views
-
-open System
-open System.Windows
-open System.Windows.Data
-open System.Windows.Input
-
-open FsXaml
-
-type NumericUpDown = XAML<"XAML/NumericUpDown.xaml", true>
-
-type NumericUpDownEvents = Up | Down
-
-type NumericUpDownController() =
-    inherit UserControlViewController<NumericUpDown>()
-
-
diff --git a/Parasitemia/ParasitemiaUI/XAML/PPICalculatorWindow.xaml b/Parasitemia/ParasitemiaUI/XAML/PPICalculatorWindow.xaml
deleted file mode 100644 (file)
index 2ac8540..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<Window 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"
-        mc:Ignorable="d"
-        x:Name="PPICalculatorWindow" Height="200" Width="378.5" MinHeight="200" MinWidth="280" Title="PPI Calculator" Icon="pack://application:,,,/Resources/icon.ico">
-   <Grid Margin="3">
-      <Grid.ColumnDefinitions>
-         <ColumnDefinition Width="Auto"/>
-         <ColumnDefinition Width="1*"/>
-      </Grid.ColumnDefinitions>
-      <Grid.RowDefinitions>
-         <RowDefinition Height="Auto" />
-         <RowDefinition Height="Auto" />
-         <RowDefinition Height="Auto" />
-         <RowDefinition Height="20" />
-         <RowDefinition Height="Auto" />
-         <RowDefinition Height="1*" />
-      </Grid.RowDefinitions>
-      <Label Content="Sensor size" Grid.Row="0" Grid.Column="0" />
-      <ComboBox x:Name="cmbSensorSize" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" />
-
-      <Label Content="Sensor resolution [Megapixel]" Grid.Row="1" Grid.Column="0" />
-      <TextBox x:Name="txtSensorResolution" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" />
-
-      <Label Content="Zoom" Grid.Row="2" Grid.Column="0" />
-      <TextBox x:Name="txtZoom" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" />
-
-      <Label Content="Image resolution [PPI]" Grid.Row="4" Grid.Column="0" />
-      <TextBox x:Name="txtImageResolution" Grid.Row="4" Grid.Column="1" VerticalAlignment="Center" IsReadOnly="True" />
-
-      <Grid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="2">
-         <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="1*"/>
-            <ColumnDefinition Width="Auto"/>
-         </Grid.ColumnDefinitions>
-         <Button x:Name="butCancel" Content="Cancel" HorizontalAlignment="Right" Margin="3" VerticalAlignment="Bottom" Width="75" Height="20" Grid.Column="0" />
-         <Button x:Name="butOK" Content="OK" HorizontalAlignment="Right" Margin="3" VerticalAlignment="Bottom" Width="75" Height="20" Grid.Column="1" />
-      </Grid>
-   </Grid>
-</Window>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUI/XAML/PPICalculatorWindow.xaml.fs b/Parasitemia/ParasitemiaUI/XAML/PPICalculatorWindow.xaml.fs
deleted file mode 100644 (file)
index bfa0dd1..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace ParasitemiaUI.Views
-
-open FsXaml
-
-type PPICalculatorWindow = XAML<"XAML/PPICalculatorWindow.xaml">
-
diff --git a/Parasitemia/ParasitemiaUI/XAML/RBCFrame.xaml b/Parasitemia/ParasitemiaUI/XAML/RBCFrame.xaml
deleted file mode 100644 (file)
index 41c1fc6..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<UserControl
-               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:fsxaml="clr-namespace:FsXaml;assembly=FsXaml.Wpf"
-      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-      mc:Ignorable="d" d:DesignWidth="100" d:DesignHeight="100"
-               >
-   <Grid x:Name="grid">
-      <Grid.ContextMenu>
-         <ContextMenu>
-            <MenuItem x:Name="menuRBCSetAsHealthy" Header="_Set as healthy"  />
-            <MenuItem x:Name="menuRBCSetAsInfected" Header="_Set as infected" />
-         </ContextMenu>
-      </Grid.ContextMenu>
-      <Rectangle x:Name="border" Fill="#00000000" />
-      <Polygon x:Name="manuallyAdded" Points="0,0 12,0, 12,12" Fill="Black" HorizontalAlignment="Right" VerticalAlignment="Top" />
-      <Border HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,3,3" Background="#66000000" CornerRadius="5">
-         <TextBlock x:Name="txtRBCNumber" Padding="2" Text="42" Foreground="White" FontSize="12" />
-      </Border>
-   </Grid>
-</UserControl>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUI/XAML/RBCFrame.xaml.fs b/Parasitemia/ParasitemiaUI/XAML/RBCFrame.xaml.fs
deleted file mode 100644 (file)
index f6bfdfb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace ParasitemiaUI.Views
-
-open System
-open System.Windows
-open System.Windows.Data
-open System.Windows.Input
-
-open ViewModule.FSharp
-open FsXaml
-
-type RBCFrame = XAML<"XAML/RBCFrame.xaml">
diff --git a/Parasitemia/ParasitemiaUIControls/AboutWindow.xaml b/Parasitemia/ParasitemiaUIControls/AboutWindow.xaml
new file mode 100644 (file)
index 0000000..d1283bb
--- /dev/null
@@ -0,0 +1,28 @@
+<Window
+    x:Class="ParasitemiaUIControls.AboutWindow"
+    xmlns:local="clr-namespace:ParasitemiaUIControls"
+    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"
+    mc:Ignorable="d"
+    Height="220" Width="280" MinHeight="220" MinWidth="280" Title="About" Icon="/ParasitemiaUIControls;component/Resources/icon.ico" ResizeMode="NoResize"
+>
+    <Grid Margin="3">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition/>
+        </Grid.RowDefinitions>
+        <Image HorizontalAlignment="Left" Height="64" VerticalAlignment="Top" Width="64" Margin="6" Source="/ParasitemiaUIControls;component/Resources/icon.ico"/>
+        <TextBlock x:Name="txtAbout" x:FieldModifier="public" HorizontalAlignment="Left" Margin="20,6" Grid.Row="1" TextWrapping="Wrap">
+         <Bold FontSize="14.667">Parasitemia </Bold>
+         <LineBreak />
+         <Hyperlink x:Name="linkHESSO" x:FieldModifier="public" NavigateUri="http://www.hes-so.ch" >HES-SO</Hyperlink> /
+         <Hyperlink x:Name="linkCHUV" x:FieldModifier="public" NavigateUri="http://www.chuv.ch/" >CHUV</Hyperlink>
+         <LineBreak />
+         <Hyperlink x:Name="linkGBurri" x:FieldModifier="public" NavigateUri="mailto:greg.burri@gmail.com"> Grégory Burri</Hyperlink>
+        </TextBlock>
+        <Button x:Name="butClose" x:FieldModifier="public" Content="Close" HorizontalAlignment="Right" Margin="3" VerticalAlignment="Bottom" Width="75" Grid.Row="2" Height="20"/>
+    </Grid>
+</Window>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUIControls/AboutWindow.xaml.cs b/Parasitemia/ParasitemiaUIControls/AboutWindow.xaml.cs
new file mode 100644 (file)
index 0000000..3ba9358
--- /dev/null
@@ -0,0 +1,12 @@
+using System.Windows;
+
+namespace ParasitemiaUIControls
+{
+    public partial class AboutWindow : Window
+    {
+        public AboutWindow()
+        {
+            this.InitializeComponent();
+        }
+    }
+}
diff --git a/Parasitemia/ParasitemiaUIControls/AnalysisWindow.xaml b/Parasitemia/ParasitemiaUIControls/AnalysisWindow.xaml
new file mode 100644 (file)
index 0000000..e124cc5
--- /dev/null
@@ -0,0 +1,34 @@
+<Window
+    x:Class="ParasitemiaUIControls.AnalysisWindow"
+    xmlns:local="clr-namespace:ParasitemiaUIControls"
+    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"
+    mc:Ignorable="d"
+    Height="453" Width="515" MinHeight="100" MinWidth="100" Title="Analysis" Icon="/ParasitemiaUIControls;component/Resources/icon.ico"
+>
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="50*"/>
+            <RowDefinition Height="30"/>
+            <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">
+            <TextBlock x:Name="textLog" x:FieldModifier="public" />
+        </ScrollViewer>
+        <Grid Grid.Row="3">
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition/>
+                <ColumnDefinition/>
+            </Grid.ColumnDefinitions>
+            <Button x:Name="butStart" x:FieldModifier="public" Content="Start analysis"  Margin="3" Grid.Column="0"/>
+            <Button x:Name="butClose" x:FieldModifier="public" Content="Close"  Margin="3" Grid.Column="1"/>
+        </Grid>
+    </Grid>
+</Window>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUIControls/AnalysisWindow.xaml.cs b/Parasitemia/ParasitemiaUIControls/AnalysisWindow.xaml.cs
new file mode 100644 (file)
index 0000000..be1043b
--- /dev/null
@@ -0,0 +1,12 @@
+using System.Windows;
+
+namespace ParasitemiaUIControls
+{
+    public partial class AnalysisWindow : Window
+    {
+        public AnalysisWindow()
+        {
+            this.InitializeComponent();
+        }
+    }
+}
diff --git a/Parasitemia/ParasitemiaUIControls/CommandLineArgumentsWindow.xaml b/Parasitemia/ParasitemiaUIControls/CommandLineArgumentsWindow.xaml
new file mode 100644 (file)
index 0000000..733eb9a
--- /dev/null
@@ -0,0 +1,21 @@
+<Window
+    x:Class="ParasitemiaUIControls.CommandLineArgumentsWindow"
+    xmlns:local="clr-namespace:ParasitemiaUIControls"
+    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"
+    mc:Ignorable="d"
+    Height="420" Width="620" Title="Command Line Arguments" Icon="/ParasitemiaUIControls;component/Resources/icon.ico" ResizeMode="CanResizeWithGrip"
+>
+    <Grid Margin="3">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="*"/>
+            <RowDefinition Height="Auto"/>
+        </Grid.RowDefinitions>
+        <TextBlock Margin="3">Parasitemia can be launched via a command line, here are the possible arguments</TextBlock>
+        <TextBox x:Name="txtCommandLineArguments" x:FieldModifier="public" Margin="6" Grid.Row="1" TextWrapping="Wrap" FontFamily="Courier New" FontSize="11" IsReadOnly="True" />
+        <Button x:Name="butClose" x:FieldModifier="public" Content="Close" HorizontalAlignment="Right" Margin="3" VerticalAlignment="Bottom" Width="75" Grid.Row="2" Height="20"/>
+    </Grid>
+</Window>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUIControls/CommandLineArgumentsWindow.xaml.cs b/Parasitemia/ParasitemiaUIControls/CommandLineArgumentsWindow.xaml.cs
new file mode 100644 (file)
index 0000000..9115fd5
--- /dev/null
@@ -0,0 +1,12 @@
+using System.Windows;
+
+namespace ParasitemiaUIControls
+{
+    public partial class CommandLineArgumentsWindow : Window
+    {
+        public CommandLineArgumentsWindow()
+        {
+            this.InitializeComponent();
+        }
+    }
+}
diff --git a/Parasitemia/ParasitemiaUIControls/ImageSourcePreview.xaml b/Parasitemia/ParasitemiaUIControls/ImageSourcePreview.xaml
new file mode 100644 (file)
index 0000000..7c696f1
--- /dev/null
@@ -0,0 +1,24 @@
+<UserControl
+    x:Class="ParasitemiaUIControls.ImageSourcePreview"
+    xmlns:local="clr-namespace:ParasitemiaUIControls"
+    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"
+    mc:Ignorable="d" d:DesignWidth="119.223" d:DesignHeight="84.911"
+>
+    <Border x:Name="border" x:FieldModifier="public" ClipToBounds="True" BorderBrush="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}">
+        <Grid x:Name="grid">
+            <Grid.ContextMenu>
+                <ContextMenu>
+                    <MenuItem x:Name="menuRemoveImage" x:FieldModifier="public" Header="_Remove image"  />
+                </ContextMenu>
+            </Grid.ContextMenu>
+            <Image x:Name="imagePreview" x:FieldModifier="public" />
+            <Border HorizontalAlignment="Right" VerticalAlignment="Bottom" Background="#4C000000" Margin="0,0,3,3" CornerRadius="5" >
+                <TextBlock x:Name="txtImageNumber" x:FieldModifier="public" Padding="2" Text="42" Foreground="White" />
+            </Border>
+            <Rectangle x:Name="viewport" x:FieldModifier="public" Margin="24,30,71,26" Stroke="#BFFFFF00" RenderTransformOrigin="0.5,0.5" Visibility="Hidden"/>
+        </Grid>
+    </Border>
+</UserControl>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUIControls/ImageSourcePreview.xaml.cs b/Parasitemia/ParasitemiaUIControls/ImageSourcePreview.xaml.cs
new file mode 100644 (file)
index 0000000..7e825b9
--- /dev/null
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace ParasitemiaUIControls
+{
+    public partial class ImageSourcePreview : UserControl
+    {
+        public ImageSourcePreview()
+        {
+            this.InitializeComponent();
+        }
+    }
+}
diff --git a/Parasitemia/ParasitemiaUIControls/ImageSourceSelection.xaml b/Parasitemia/ParasitemiaUIControls/ImageSourceSelection.xaml
new file mode 100644 (file)
index 0000000..071c269
--- /dev/null
@@ -0,0 +1,75 @@
+<UserControl
+    x:Class="ParasitemiaUIControls.ImageSourceSelection"
+    xmlns:local="clr-namespace:ParasitemiaUIControls"
+    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"
+    mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="120"
+>
+    <UserControl.Background>
+        <SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ControlColorKey}}"/>
+    </UserControl.Background>
+    <Grid x:Name="gridMain">
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="100"/>
+            <ColumnDefinition/>
+        </Grid.ColumnDefinitions>
+        <Grid x:Name="gridImage" Grid.ColumnSpan="1" VerticalAlignment="Top">
+            <Image x:Name="imagePreview" x:FieldModifier="public" />
+            <CheckBox x:Name="chkSelection" x:FieldModifier="public" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="3,3,0,0"/>
+            <Border HorizontalAlignment="Right" VerticalAlignment="Bottom" Background="#4C000000" Margin="0,0,3,3" CornerRadius="5" >
+                <TextBlock x:Name="txtImageNumber" x:FieldModifier="public" Padding="2" Text="42" Foreground="White" />
+            </Border>
+            <Rectangle x:Name="viewport" x:FieldModifier="public" Margin="24,30,71,26" Stroke="#BFFFFF00" RenderTransformOrigin="0.5,0.5" Visibility="Hidden"/>
+        </Grid>
+        <Grid Grid.Column="1">
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="Auto"/>
+                <ColumnDefinition/>
+            </Grid.ColumnDefinitions>
+            <Grid.RowDefinitions>
+                <RowDefinition Height="Auto"/>
+                <RowDefinition Height="Auto"/>
+                <RowDefinition Height="1*"/>
+            </Grid.RowDefinitions>
+            <Label Content="Last analysis" Grid.Column="0" Grid.Row="0" Margin="10,0,3,0" />
+            <Label Content="Resolution [PPI]" Grid.Column="0" Grid.Row="1" Margin="10,0,3,0" />
+            <Label x:Name="lblDateLastAnalysis" x:FieldModifier="public" Grid.Column="1" Margin="3,0,3,0"/>
+            <Grid Grid.Column="1" Grid.Row="1">
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition/>
+                    <ColumnDefinition Width="Auto"/>
+                    <ColumnDefinition Width="Auto"/>
+                </Grid.ColumnDefinitions>
+                <TextBox x:Name="txtResolution" x:FieldModifier="public" Margin="3" Text="" Grid.Column="0" />
+                <Button x:Name="butDefaultResolutions" x:FieldModifier="public" Content="Predefined values" Grid.Column="1" Margin="3">
+                    <Button.ContextMenu>
+                        <ContextMenu x:Name="predefinedValuesMenu" x:FieldModifier="public">
+                            <!-- MenuItem x:Name="menuZoom50X" Header="50X: 230'000 PPI" />
+                     <MenuItem x:Name="menuZoom100X" Header="100X: 460'000 PPI" / -->
+                        </ContextMenu>
+                    </Button.ContextMenu>
+                    <Button.Style>
+                        <Style TargetType="{x:Type Button}">
+                            <Style.Triggers>
+                                <EventTrigger RoutedEvent="Click">
+                                    <EventTrigger.Actions>
+                                        <BeginStoryboard>
+                                            <Storyboard>
+                                                <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="ContextMenu.IsOpen">
+                                                    <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="True"/>
+                                                </BooleanAnimationUsingKeyFrames>
+                                            </Storyboard>
+                                        </BeginStoryboard>
+                                    </EventTrigger.Actions>
+                                </EventTrigger>
+                            </Style.Triggers>
+                        </Style>
+                    </Button.Style>
+                </Button>
+                <Button x:Name="butPPICalculator" x:FieldModifier="public" Content="PPI calculator" Grid.Column="2" Margin="3" />
+            </Grid>
+        </Grid>
+    </Grid>
+</UserControl>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUIControls/ImageSourceSelection.xaml.cs b/Parasitemia/ParasitemiaUIControls/ImageSourceSelection.xaml.cs
new file mode 100644 (file)
index 0000000..9f61d6b
--- /dev/null
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace ParasitemiaUIControls
+{
+    public partial class ImageSourceSelection : UserControl
+    {
+        public ImageSourceSelection()
+        {
+            this.InitializeComponent();
+        }
+    }
+}
diff --git a/Parasitemia/ParasitemiaUIControls/MainWindow.xaml b/Parasitemia/ParasitemiaUIControls/MainWindow.xaml
new file mode 100644 (file)
index 0000000..142cc58
--- /dev/null
@@ -0,0 +1,124 @@
+<Window
+    x:Class="ParasitemiaUIControls.MainWindow"
+    xmlns:local="clr-namespace:ParasitemiaUIControls"
+    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"
+    mc:Ignorable="d"
+    Height="700" Width="1000" MinHeight="300" MinWidth="400" Title="Parasitemia" Icon="/ParasitemiaUIControls;component/Resources/icon.ico" ResizeMode="CanResizeWithGrip"
+>
+    <DockPanel x:Name="dockPanelMain" LastChildFill="True">
+        <Menu DockPanel.Dock="Top">
+            <MenuItem Header="_File">
+                <MenuItem x:Name="menuNew" x:FieldModifier="public" Header="_New" InputGestureText="Ctrl+N" />
+                <MenuItem x:Name="menuOpen" x:FieldModifier="public" Header="_Open" InputGestureText="Ctrl+O" />
+                <MenuItem x:Name="menuSave" x:FieldModifier="public" Header="_Save" InputGestureText="Ctrl+S" />
+                <MenuItem x:Name="menuSaveAs" x:FieldModifier="public" Header="Save _As..." InputGestureText="Ctrl+Shift+S" />
+                <Separator />
+                <MenuItem x:Name="menuAddSourceImage" x:FieldModifier="public" Header="_Import Images..." InputGestureText="Ctrl+A" />
+                <Separator />
+                <MenuItem x:Name="menuExportResults" x:FieldModifier="public" Header="E_xport Results As Text..." InputGestureText="Ctrl+E" />
+                <Separator />
+                <MenuItem x:Name="menuExit" x:FieldModifier="public" Header="_Exit" />
+            </MenuItem>
+            <MenuItem x:Name="menuAnalysis" x:FieldModifier="public" Header="_Analysis">
+                <MenuItem x:Name="menuStartAnalysis" x:FieldModifier="public" Header="_Show Analysis Window" InputGestureText="Ctrl+Y" />
+            </MenuItem>
+            <MenuItem x:Name="menuView" x:FieldModifier="public" Header="_View">
+                <MenuItem x:Name="menuHightlightRBC" x:FieldModifier="public" Header="_Highlight All Erythrocytes" IsCheckable="True" InputGestureText="Ctrl+H" />
+            </MenuItem>
+            <MenuItem x:Name="menuHelp" x:FieldModifier="public" Header="_Help">
+                <MenuItem x:Name="menuCommandLineArguments" x:FieldModifier="public" Header="_Command Line Arguments" />
+                <MenuItem x:Name="menuAbout" x:FieldModifier="public" Header="_About" />
+            </MenuItem>
+        </Menu>
+        <StatusBar DockPanel.Dock="Bottom" >
+            <StatusBarItem>
+                <TextBlock x:Name="txtDocumentStatus" x:FieldModifier="public" />
+            </StatusBarItem>
+            <StatusBarItem>
+                <TextBlock x:Name="txtMessageStatus" x:FieldModifier="public" />
+            </StatusBarItem>
+        </StatusBar>
+        <Grid x:Name="gridMain">
+            <Grid.RowDefinitions>
+                <RowDefinition Height="Auto"/>
+                <RowDefinition/>
+            </Grid.RowDefinitions>
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="180" />
+                <ColumnDefinition/>
+            </Grid.ColumnDefinitions>
+            <Grid x:Name="gridGlobalInfo" Grid.ColumnSpan="2" Margin="3,3,3,3" >
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="101"/>
+                    <ColumnDefinition Width="21"/>
+                    <ColumnDefinition/>
+                </Grid.ColumnDefinitions>
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="Auto"/>
+                    <RowDefinition Height="Auto"/>
+                </Grid.RowDefinitions>
+                <Label x:Name="lblPatient" x:FieldModifier="public" Margin="10,0,3,0 " Content="Patient ID" Grid.ColumnSpan="2"/>
+                <Label x:Name="lblGlobalParasitemia" x:FieldModifier="public" Margin="10,0,3,0" Content="Global parasitemia" Grid.Row="1" Grid.ColumnSpan="2" />
+                <TextBox x:Name="txtPatient" x:FieldModifier="public" Grid.Column="2" Margin="3,4,10,4" TextWrapping="Wrap" VerticalAlignment="Center" />
+                <Border BorderThickness="1" VerticalAlignment="Center" Margin="3,4,10,4" BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" Grid.Column="2" Grid.Row="1" >
+                    <TextBlock x:Name="txtGlobalParasitemia" x:FieldModifier="public" Margin="1" TextWrapping="Wrap"  />
+                </Border>
+            </Grid>
+            <Border BorderBrush="Black" BorderThickness="0"  Margin="3" Grid.Row="1" >
+                <ScrollViewer x:Name="scrollPreviews" x:FieldModifier="public" VerticalScrollBarVisibility="Auto" >
+                    <StackPanel x:Name="stackPreviews" x:FieldModifier="public" />
+                </ScrollViewer>
+            </Border>
+            <Grid Grid.Column="2" Grid.Row="2">
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="100"/>
+                    <RowDefinition/>
+                    <RowDefinition Height="Auto"/>
+                </Grid.RowDefinitions>
+                <ScrollViewer x:Name="scrollViewCurrentImage" x:FieldModifier="public" Grid.Row="1" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible" MinHeight="100" MinWidth="100" Background="#FF3E3E3E">
+                    <Border x:Name="borderCurrentImage" x:FieldModifier="public" BorderBrush="Transparent">
+                        <Canvas x:Name="canvasCurrentImage" x:FieldModifier="public" Height="100" Width="100" />
+                    </Border>
+                </ScrollViewer>
+                <Border Grid.Row="1" x:Name="imgLogos" x:FieldModifier="public">
+                    <Grid>
+                        <Grid.RowDefinitions>
+                            <RowDefinition Height="1*"/>
+                            <RowDefinition Height="Auto"/>
+                            <RowDefinition Height="Auto"/>
+                            <RowDefinition Height="1*"/>
+                        </Grid.RowDefinitions>
+                        <Image Grid.Row="1" Source="/ParasitemiaUIControls;component/Resources/chuv_logo.png" Stretch="None" Panel.ZIndex="1" Margin="0,0,0,10" />
+                        <Image Grid.Row="2" Source="/ParasitemiaUIControls;component/Resources/hes-so_logo.png" Stretch="None" Panel.ZIndex="1" Margin="0,10,0,0" />
+                    </Grid>
+                </Border>
+                <ScrollViewer x:Name="scrollRBC" x:FieldModifier="public" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Visible" Grid.RowSpan="1"  Margin="3">
+                    <StackPanel x:Name="stackRBC" x:FieldModifier="public" Orientation="Horizontal" />
+                </ScrollViewer>
+                <Grid x:Name="gridImageInformation" x:FieldModifier="public" Grid.Row="2">
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="1*"/>
+                        <ColumnDefinition Width="1*"/>
+                    </Grid.ColumnDefinitions>
+                    <Grid.RowDefinitions>
+                        <RowDefinition Height="Auto" />
+                        <RowDefinition Height="1*" />
+                    </Grid.RowDefinitions>
+                    <Grid Grid.ColumnSpan="2" Grid.Row="0" Margin="0,3,3,0">
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition Width="Auto"/>
+                            <ColumnDefinition Width="1*"/>
+                        </Grid.ColumnDefinitions>
+                        <Label Content="Image name" Grid.Column="0"></Label>
+                        <TextBox x:Name="txtImageName" x:FieldModifier="public" Grid.Column="1" VerticalAlignment="Center"></TextBox>
+                    </Grid>
+                    <TextBlock x:Name="txtImageInformation1" x:FieldModifier="public" TextWrapping="Wrap" Margin="3" Grid.Column="0" Grid.Row="1" />
+                    <TextBlock x:Name="txtImageInformation2" x:FieldModifier="public" TextWrapping="Wrap" Margin="3" Grid.Column="1" Grid.Row="1" />
+                </Grid>
+            </Grid>
+        </Grid>
+    </DockPanel>
+</Window>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUIControls/MainWindow.xaml.cs b/Parasitemia/ParasitemiaUIControls/MainWindow.xaml.cs
new file mode 100644 (file)
index 0000000..f0fc4aa
--- /dev/null
@@ -0,0 +1,12 @@
+using System.Windows;
+
+namespace ParasitemiaUIControls
+{
+    public partial class MainWindow : Window
+    {
+        public MainWindow()
+        {
+            this.InitializeComponent();
+        }
+    }
+}
diff --git a/Parasitemia/ParasitemiaUIControls/NumericUpDown.xaml b/Parasitemia/ParasitemiaUIControls/NumericUpDown.xaml
new file mode 100644 (file)
index 0000000..2c61a6d
--- /dev/null
@@ -0,0 +1,23 @@
+<UserControl
+    x:Class="ParasitemiaUIControls.NumericUpDown"
+    xmlns:local="clr-namespace:ParasitemiaUIControls"
+    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"
+    mc:Ignorable="d" d:DesignWidth="259.5" d:DesignHeight="45.5"
+>
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition />
+            <RowDefinition />
+        </Grid.RowDefinitions>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="*" />
+            <ColumnDefinition Width="Auto" />
+        </Grid.ColumnDefinitions>
+        <Button x:Name="upButton" Grid.Column="1" Content="^"/>
+        <Button x:Name="downButton" Grid.Column="1" Grid.Row="1" Content="v"/>
+        <TextBox x:Name="input" Grid.RowSpan="2" />
+    </Grid>
+</UserControl>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUIControls/NumericUpDown.xaml.cs b/Parasitemia/ParasitemiaUIControls/NumericUpDown.xaml.cs
new file mode 100644 (file)
index 0000000..62c1c4c
--- /dev/null
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace ParasitemiaUIControls
+{
+    public partial class NumericUpDown : UserControl
+    {
+        public NumericUpDown()
+        {
+            this.InitializeComponent();
+        }
+    }
+}
diff --git a/Parasitemia/ParasitemiaUIControls/PPICalculatorWindow.xaml b/Parasitemia/ParasitemiaUIControls/PPICalculatorWindow.xaml
new file mode 100644 (file)
index 0000000..30f1502
--- /dev/null
@@ -0,0 +1,45 @@
+<Window
+    x:Class="ParasitemiaUIControls.PPICalculatorWindow"
+    xmlns:local="clr-namespace:ParasitemiaUIControls"
+    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"
+    mc:Ignorable="d"
+    Height="200" Width="378.5" MinHeight="200" MinWidth="280" Title="PPI Calculator" Icon="/ParasitemiaUIControls;component/Resources/icon.ico"
+>
+    <Grid Margin="3">
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="Auto"/>
+            <ColumnDefinition Width="1*"/>
+        </Grid.ColumnDefinitions>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="Auto" />
+            <RowDefinition Height="Auto" />
+            <RowDefinition Height="Auto" />
+            <RowDefinition Height="20" />
+            <RowDefinition Height="Auto" />
+            <RowDefinition Height="1*" />
+        </Grid.RowDefinitions>
+        <Label Content="Sensor size" Grid.Row="0" Grid.Column="0" />
+        <ComboBox x:Name="cmbSensorSize" x:FieldModifier="public" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" />
+
+        <Label Content="Sensor resolution [Megapixel]" Grid.Row="1" Grid.Column="0" />
+        <TextBox x:Name="txtSensorResolution" x:FieldModifier="public" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" />
+
+        <Label Content="Zoom" Grid.Row="2" Grid.Column="0" />
+        <TextBox x:Name="txtZoom" Grid.Row="2" x:FieldModifier="public" Grid.Column="1" VerticalAlignment="Center" />
+
+        <Label Content="Image resolution [PPI]" Grid.Row="4" Grid.Column="0" />
+        <TextBox x:Name="txtImageResolution" x:FieldModifier="public" Grid.Row="4" Grid.Column="1" VerticalAlignment="Center" IsReadOnly="True" />
+
+        <Grid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="2">
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="1*"/>
+                <ColumnDefinition Width="Auto"/>
+            </Grid.ColumnDefinitions>
+            <Button x:Name="butCancel" x:FieldModifier="public" Content="Cancel" HorizontalAlignment="Right" Margin="3" VerticalAlignment="Bottom" Width="75" Height="20" Grid.Column="0" />
+            <Button x:Name="butOK" x:FieldModifier="public" Content="OK" HorizontalAlignment="Right" Margin="3" VerticalAlignment="Bottom" Width="75" Height="20" Grid.Column="1" />
+        </Grid>
+    </Grid>
+</Window>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUIControls/PPICalculatorWindow.xaml.cs b/Parasitemia/ParasitemiaUIControls/PPICalculatorWindow.xaml.cs
new file mode 100644 (file)
index 0000000..901253c
--- /dev/null
@@ -0,0 +1,13 @@
+using System.Windows;
+using System.Windows.Controls;
+
+namespace ParasitemiaUIControls
+{
+    public partial class PPICalculatorWindow : Window
+    {
+        public PPICalculatorWindow()
+        {
+            this.InitializeComponent();
+        }
+    }
+}
diff --git a/Parasitemia/ParasitemiaUIControls/ParasitemiaUIControls.csproj b/Parasitemia/ParasitemiaUIControls/ParasitemiaUIControls.csproj
new file mode 100644 (file)
index 0000000..bd3d88c
--- /dev/null
@@ -0,0 +1,14 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFramework>net5.0-windows</TargetFramework>
+    <UseWPF>true</UseWPF>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <Resource Include="Resources\chuv_logo.png" />
+    <Resource Include="Resources\hes-so_logo.png" />
+    <Resource Include="Resources\icon.ico" />
+  </ItemGroup>
+
+</Project>
diff --git a/Parasitemia/ParasitemiaUIControls/RBCFrame.xaml b/Parasitemia/ParasitemiaUIControls/RBCFrame.xaml
new file mode 100644 (file)
index 0000000..52fb2f8
--- /dev/null
@@ -0,0 +1,23 @@
+<UserControl
+    x:Class="ParasitemiaUIControls.RBCFrame"
+    xmlns:local="clr-namespace:ParasitemiaUIControls"
+    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"
+    mc:Ignorable="d" d:DesignWidth="100" d:DesignHeight="100"
+>
+    <Grid x:Name="grid" x:FieldModifier="public">
+        <Grid.ContextMenu>
+            <ContextMenu>
+                <MenuItem x:Name="menuRBCSetAsHealthy" x:FieldModifier="public" Header="_Set as healthy"  />
+                <MenuItem x:Name="menuRBCSetAsInfected" x:FieldModifier="public" Header="_Set as infected" />
+            </ContextMenu>
+        </Grid.ContextMenu>
+        <Rectangle x:Name="border" x:FieldModifier="public" Fill="#00000000" />
+        <Polygon x:Name="manuallyAdded" x:FieldModifier="public" Points="0,0 12,0, 12,12" Fill="Black" HorizontalAlignment="Right" VerticalAlignment="Top" />
+        <Border HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,3,3" Background="#66000000" CornerRadius="5">
+            <TextBlock x:Name="txtRBCNumber" x:FieldModifier="public" Padding="2" Text="42" Foreground="White" FontSize="12" />
+        </Border>
+    </Grid>
+</UserControl>
\ No newline at end of file
diff --git a/Parasitemia/ParasitemiaUIControls/RBCFrame.xaml.cs b/Parasitemia/ParasitemiaUIControls/RBCFrame.xaml.cs
new file mode 100644 (file)
index 0000000..5843111
--- /dev/null
@@ -0,0 +1,12 @@
+using System.Windows.Controls;
+
+namespace ParasitemiaUIControls
+{
+    public partial class RBCFrame : UserControl
+    {
+        public RBCFrame()
+        {
+            this.InitializeComponent();
+        }
+    }
+}
diff --git a/Parasitemia/ParasitemiaUIControls/Resources/chuv_logo.png b/Parasitemia/ParasitemiaUIControls/Resources/chuv_logo.png
new file mode 100644 (file)
index 0000000..e062ad8
Binary files /dev/null and b/Parasitemia/ParasitemiaUIControls/Resources/chuv_logo.png differ
diff --git a/Parasitemia/ParasitemiaUIControls/Resources/hes-so_logo.png b/Parasitemia/ParasitemiaUIControls/Resources/hes-so_logo.png
new file mode 100644 (file)
index 0000000..7900495
Binary files /dev/null and b/Parasitemia/ParasitemiaUIControls/Resources/hes-so_logo.png differ
diff --git a/Parasitemia/ParasitemiaUIControls/Resources/icon.ico b/Parasitemia/ParasitemiaUIControls/Resources/icon.ico
new file mode 100644 (file)
index 0000000..147e3a8
Binary files /dev/null and b/Parasitemia/ParasitemiaUIControls/Resources/icon.ico differ
index 8b47211..6c4f0ee 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\..\packages\xunit.runner.visualstudio.2.4.2\build\net452\xunit.runner.visualstudio.props" Condition="Exists('..\..\packages\xunit.runner.visualstudio.2.4.2\build\net452\xunit.runner.visualstudio.props')" />
+  <Import Project="..\..\packages\xunit.runner.visualstudio.2.4.3\build\net452\xunit.runner.visualstudio.props" Condition="Exists('..\..\packages\xunit.runner.visualstudio.2.4.3\build\net452\xunit.runner.visualstudio.props')" />
   <Import Project="..\..\packages\xunit.core.2.4.1\build\xunit.core.props" Condition="Exists('..\..\packages\xunit.core.2.4.1\build\xunit.core.props')" />
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
   <PropertyGroup>
@@ -87,7 +87,7 @@
     </PropertyGroup>
     <Error Condition="!Exists('..\..\packages\xunit.core.2.4.1\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.core.2.4.1\build\xunit.core.props'))" />
     <Error Condition="!Exists('..\..\packages\xunit.core.2.4.1\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.core.2.4.1\build\xunit.core.targets'))" />
-    <Error Condition="!Exists('..\..\packages\xunit.runner.visualstudio.2.4.2\build\net452\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.runner.visualstudio.2.4.2\build\net452\xunit.runner.visualstudio.props'))" />
+    <Error Condition="!Exists('..\..\packages\xunit.runner.visualstudio.2.4.3\build\net452\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.runner.visualstudio.2.4.3\build\net452\xunit.runner.visualstudio.props'))" />
   </Target>
   <Import Project="..\..\packages\xunit.core.2.4.1\build\xunit.core.targets" Condition="Exists('..\..\packages\xunit.core.2.4.1\build\xunit.core.targets')" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
index 4e78936..46d27dd 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="FSharp.Core" version="4.7.2" targetFramework="net48" />
   <package id="System.ValueTuple" version="4.5.0" targetFramework="net48" />
   <package id="xunit" version="2.4.1" targetFramework="net48" />
   <package id="xunit.abstractions" version="2.0.3" targetFramework="net48" />
@@ -9,5 +8,5 @@
   <package id="xunit.core" version="2.4.1" targetFramework="net48" />
   <package id="xunit.extensibility.core" version="2.4.1" targetFramework="net48" />
   <package id="xunit.extensibility.execution" version="2.4.1" targetFramework="net48" />
-  <package id="xunit.runner.visualstudio" version="2.4.2" targetFramework="net48" developmentDependency="true" />
+  <package id="xunit.runner.visualstudio" version="2.4.3" targetFramework="net48" developmentDependency="true" />
 </packages>
\ No newline at end of file
diff --git a/Parasitemia/WPF/BitmapSourceConverter.cs b/Parasitemia/WPF/BitmapSourceConverter.cs
deleted file mode 100644 (file)
index 413a53b..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-//----------------------------------------------------------------------------
-//  Copyright (C) 2004-2015 by EMGU Corporation. All rights reserved.       
-//----------------------------------------------------------------------------
-
-using System;
-using System.Runtime.InteropServices;
-using System.Windows;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Shapes;
-using Emgu.CV;
-
-namespace Emgu.CV.WPF
-{
-   public static class BitmapSourceConvert
-   {
-      /// <summary>
-      /// Delete a GDI object
-      /// </summary>
-      /// <param name="o">The poniter to the GDI object to be deleted</param>
-      /// <returns></returns>
-      [DllImport("gdi32")]
-      private static extern int DeleteObject(IntPtr o);
-
-      /// <summary>
-      /// Convert an IImage to a WPF BitmapSource. The result can be used in the Set Property of Image.Source
-      /// </summary>
-      /// <param name="image">The Emgu CV Image</param>
-      /// <returns>The equivalent BitmapSource</returns>
-      public static BitmapSource ToBitmapSource(IImage image)
-      {
-         using (System.Drawing.Bitmap source = image.Bitmap)
-         {
-            IntPtr ptr = source.GetHbitmap(); //obtain the Hbitmap
-
-            BitmapSource bs = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
-                ptr,
-                IntPtr.Zero,
-                Int32Rect.Empty,
-                System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());
-
-            DeleteObject(ptr); //release the HBitmap
-            return bs;
-         }
-      }
-   }
-}
\ No newline at end of file
diff --git a/Parasitemia/WPF/License-LGPL.txt b/Parasitemia/WPF/License-LGPL.txt
deleted file mode 100644 (file)
index 84d8640..0000000
+++ /dev/null
@@ -1,506 +0,0 @@
-                 GNU LESSER GENERAL PUBLIC LICENSE
-                      Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-                           Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-                 GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-                           NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-                    END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-
-
diff --git a/Parasitemia/WPF/OpenTK.dll.config b/Parasitemia/WPF/OpenTK.dll.config
deleted file mode 100644 (file)
index 7098d39..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<configuration>
-  <dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
-  <dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
-  <dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/>
-  <dllmap os="linux" dll="alut.dll" target="libalut.so.0"/>
-  <dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/>
-  <dllmap os="linux" dll="libX11" target="libX11.so.6"/>
-  <dllmap os="linux" dll="libXi" target="libXi.so.6"/>
-  <dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/>
-  <dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/>
-  <dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
-  <dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
-  <dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
-  <dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
-  <dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
-  <dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
-  <dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/>
-  <!-- XQuartz compatibility (X11 on Mac) -->
-  <dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/>
-  <dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/>
-  <dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/>
-  <dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/>
-  <dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/>
-  <dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/>
-</configuration>
diff --git a/Parasitemia/WPF/Properties/AssemblyInfo.cs b/Parasitemia/WPF/Properties/AssemblyInfo.cs
deleted file mode 100644 (file)
index d5a397f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("WPF")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("WPF")]
-[assembly: AssemblyCopyright("Copyright ©  2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible 
-// to COM components.  If you need to access a type in this assembly from 
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("314fd78e-870e-4794-bb16-ea4586f2abdb")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers 
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Parasitemia/WPF/WPF.csproj b/Parasitemia/WPF/WPF.csproj
deleted file mode 100644 (file)
index 3abeaac..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="..\packages\EmguCV.3.1.0.1\build\EmguCV.props" Condition="Exists('..\packages\EmguCV.3.1.0.1\build\EmguCV.props')" />
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{314FD78E-870E-4794-BB16-EA4586F2ABDB}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>WPF</RootNamespace>
-    <AssemblyName>WPF</AssemblyName>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <NuGetPackageImportStamp>
-    </NuGetPackageImportStamp>
-    <TargetFrameworkProfile />
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <UseVSHostingProcess>false</UseVSHostingProcess>
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <Prefer32Bit>false</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <Prefer32Bit>false</Prefer32Bit>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="Emgu.CV.UI, Version=3.1.0.2282, Culture=neutral, PublicKeyToken=7281126722ab4438, processorArchitecture=MSIL">
-      <HintPath>..\packages\EmguCV.3.1.0.1\lib\net30\Emgu.CV.UI.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="Emgu.CV.UI.GL, Version=3.1.0.2282, Culture=neutral, PublicKeyToken=7281126722ab4438, processorArchitecture=MSIL">
-      <HintPath>..\packages\EmguCV.3.1.0.1\lib\net30\Emgu.CV.UI.GL.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="Emgu.CV.World, Version=3.1.0.2282, Culture=neutral, PublicKeyToken=7281126722ab4438, processorArchitecture=MSIL">
-      <HintPath>..\packages\EmguCV.3.1.0.1\lib\net30\Emgu.CV.World.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="OpenTK, Version=3.2.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
-      <HintPath>..\packages\OpenTK.3.2\lib\net20\OpenTK.dll</HintPath>
-    </Reference>
-    <Reference Include="OpenTK.GLControl, Version=3.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
-      <HintPath>..\packages\OpenTK.GLControl.3.1.0\lib\net20\OpenTK.GLControl.dll</HintPath>
-    </Reference>
-    <Reference Include="PresentationCore" />
-    <Reference Include="PresentationFramework" />
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Drawing" />
-    <Reference Include="System.Windows.Forms" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-    <Reference Include="WindowsBase" />
-    <Reference Include="ZedGraph, Version=5.1.7.430, Culture=neutral, PublicKeyToken=02a83cbd123fcd60, processorArchitecture=MSIL">
-      <HintPath>..\packages\ZedGraph.5.1.7\lib\net35-Client\ZedGraph.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="BitmapSourceConverter.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="app.config" />
-    <None Include="OpenTK.dll.config" />
-    <None Include="packages.config" />
-  </ItemGroup>
-  <ItemGroup>
-    <Content Include="License-LGPL.txt" />
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
-    <PropertyGroup>
-      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
-    </PropertyGroup>
-    <Error Condition="!Exists('..\packages\EmguCV.3.1.0.1\build\EmguCV.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EmguCV.3.1.0.1\build\EmguCV.props'))" />
-    <Error Condition="!Exists('..\packages\EmguCV.3.1.0.1\build\EmguCV.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EmguCV.3.1.0.1\build\EmguCV.targets'))" />
-  </Target>
-  <Import Project="..\packages\EmguCV.3.1.0.1\build\EmguCV.targets" Condition="Exists('..\packages\EmguCV.3.1.0.1\build\EmguCV.targets')" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>
\ No newline at end of file
diff --git a/Parasitemia/WPF/app.config b/Parasitemia/WPF/app.config
deleted file mode 100644 (file)
index 776c3be..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
-  <runtime>
-    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
-      <dependentAssembly>
-        <assemblyIdentity name="ZedGraph" publicKeyToken="02a83cbd123fcd60" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-5.1.7.430" newVersion="5.1.7.430" />
-      </dependentAssembly>
-      <dependentAssembly>
-        <assemblyIdentity name="OpenTK" publicKeyToken="bad199fe84eb3df4" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-3.2.0.0" newVersion="3.2.0.0" />
-      </dependentAssembly>
-      <dependentAssembly>
-        <assemblyIdentity name="OpenTK.GLControl" publicKeyToken="bad199fe84eb3df4" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
-      </dependentAssembly>
-    </assemblyBinding>
-  </runtime>
-<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>
diff --git a/Parasitemia/WPF/packages.config b/Parasitemia/WPF/packages.config
deleted file mode 100644 (file)
index bc55e6f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="EmguCV" version="3.1.0.1" targetFramework="net461" />
-  <package id="OpenTK" version="3.2" targetFramework="net461" />
-  <package id="OpenTK.GLControl" version="3.1.0" targetFramework="net461" />
-  <package id="ZedGraph" version="5.1.7" targetFramework="net461" />
-</packages>
\ No newline at end of file