let defaultParameters = {
rbcDiameter = 8.<μm>
- resolution = 200.e3<ppi> // Correspond to 50X.
+ resolution = 220.e3<ppi> // Correspond to 50X.
ratioAreaPaleCenter = 1.f / 3.f // The ratio between an RBC area and the area of the its pale center.
imageSourceSelection.lblDateLastAnalysis.Content <- if srcImg.dateLastAnalysis.Ticks = 0L then "<Never>" else srcImg.dateLastAnalysis.ToString()
imageSourceSelection.txtResolution.Text <- srcImg.config.Parameters.resolution.ToString()
- imageSourceSelection.menuZoom50X.Click.AddHandler(fun obj args -> imageSourceSelection.txtResolution.Text <- "200000"; updateResolution ())
- imageSourceSelection.menuZoom100X.Click.AddHandler(fun obj args -> imageSourceSelection.txtResolution.Text <- "400000"; updateResolution ())
+ imageSourceSelection.menuZoom50X.Click.AddHandler(fun obj args -> imageSourceSelection.txtResolution.Text <- "230000"; updateResolution ())
+ imageSourceSelection.menuZoom100X.Click.AddHandler(fun obj args -> imageSourceSelection.txtResolution.Text <- "460000"; updateResolution ())
imageSourceSelection.txtResolution.PreviewTextInput.AddHandler(fun obj args ->
let text = imageSourceSelection.txtResolution.Text + args.Text
<Button x:Name="butDefaultResolutions" Content="Defaults" Grid.Column="1" Margin="3">
<Button.ContextMenu>
<ContextMenu>
- <MenuItem x:Name="menuZoom50X" Header="_200'000 PPI (50X)" />
- <MenuItem x:Name="menuZoom100X" Header="_400'000 PPI (100X)" />
+ <MenuItem x:Name="menuZoom50X" Header="_230'000 PPI (50X)" />
+ <MenuItem x:Name="menuZoom100X" Header="_460'000 PPI (100X)" />
</ContextMenu>
</Button.ContextMenu>
<Button.Style>
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="681.888" Width="787.61" MinHeight="200" MinWidth="300" Title="Parasitemia" Icon="pack://application:,,,/Resources/logo_256.png">
+ x:Name="MainWindow" Height="681.888" Width="787.61" MinHeight="200" MinWidth="300" Title="Parasitemia" Icon="pack://application:,,,/Resources/icon.ico">
<DockPanel x:Name="dockPanelMain" LastChildFill="True">
<Menu DockPanel.Dock="Top">
<MenuItem Header="_File">
// Information associated to each images.
type JSONSourceImage = {
num: int
+ RBCRadius: float32 // The RBC Radius found by granulometry.
parameters: Config.Parameters
dateLastAnalysis: DateTime
rbcs: RBC List
let imgJSONEntry = file.CreateEntry(imgFilename + ".json", CompressionLevel.Fastest)
use imgJSONFileWriter = new StreamWriter(imgJSONEntry.Open())
- imgJSONFileWriter.Write(JsonConvert.SerializeObject({ num = srcImg.num; parameters = srcImg.config.Parameters; dateLastAnalysis = srcImg.dateLastAnalysis; rbcs = srcImg.rbcs }))
+ imgJSONFileWriter.Write(JsonConvert.SerializeObject({ num = srcImg.num; RBCRadius = srcImg.config.RBCRadius.Pixel; parameters = srcImg.config.Parameters; dateLastAnalysis = srcImg.dateLastAnalysis; rbcs = srcImg.rbcs }))
let load (filePath: string) : FileData =
let imgEntry = file.GetEntry(imgEntry.Name + ".json")
use imgEntryFileReader = new StreamReader(imgEntry.Open())
let imgInfo = JsonConvert.DeserializeObject<JSONSourceImage>(imgEntryFileReader.ReadToEnd())
+ let config = Config.Config(imgInfo.parameters)
+ config.SetRBCRadius imgInfo.RBCRadius
yield { num = imgNum
- config = Config.Config(imgInfo.parameters)
+ config = config
dateLastAnalysis = imgInfo.dateLastAnalysis
img = img
rbcs = imgInfo.rbcs } ] }
\ No newline at end of file
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
+ <Win32Resource>resources.res</Win32Resource>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<Compile Include="Program.fs" />
<None Include="App.config" />
<Content Include="packages.config" />
- <Resource Include="Resources\logo_256.png" />
+ <Resource Include="Resources\icon.ico" />
</ItemGroup>
<ItemGroup>
<Reference Include="Castle.Core">
--- /dev/null
+1 ICON "resources\icon.ico"
\ No newline at end of file