X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemia%2FGUI%2FGUI.fs;h=65c3cdc561648022c7003f6ac220aaae0768fcb1;hp=a7bed54de884aaca34ff3b145568e6856e3d74a3;hb=05be8164d308447b916544ae3ce4211500dfd8da;hpb=4147bfad3c85dcf4fe7d291abf7d356379d88b4f diff --git a/Parasitemia/Parasitemia/GUI/GUI.fs b/Parasitemia/Parasitemia/GUI/GUI.fs index a7bed54..65c3cdc 100644 --- a/Parasitemia/Parasitemia/GUI/GUI.fs +++ b/Parasitemia/Parasitemia/GUI/GUI.fs @@ -114,8 +114,7 @@ let run (defaultConfig: Config) = txtImageInformation.Inlines.Add(Documents.LineBreak()) txtImageInformation.Inlines.Add(Documents.Run("Average erytrocyte diameter: ", FontWeight = FontWeights.Bold)) - txtImageInformation.Inlines.Add(Documents.Run(string (Utils.roundInt <| 2. * srcImg.rbcRadius))) - txtImageInformation.Inlines.Add(Documents.Run(" px")) + txtImageInformation.Inlines.Add(Documents.Run(srcImg.config.RBCRadius.ToString())) txtImageInformation.Inlines.Add(Documents.LineBreak()) txtImageInformation.Inlines.Add(Documents.Run("Last analysis: ", FontWeight = FontWeights.Bold)) @@ -324,7 +323,6 @@ let run (defaultConfig: Config) = then imgCtrl.ReleaseMouseCapture()) - let updatePreviews () = stackPreviews.Children.Clear () for srcImg in state.SourceImages do @@ -336,7 +334,7 @@ let run (defaultConfig: Config) = updatePreviews () updateGlobalParasitemia () - txtPatient.TextChanged.AddHandler(fun obj args -> state.PatientID <- txtPatient.Text) + txtPatient.LostFocus.AddHandler(fun obj args -> state.PatientID <- txtPatient.Text) menuExit.Click.AddHandler(fun obj args -> askSaveCurrent () @@ -365,7 +363,7 @@ let run (defaultConfig: Config) = let res = dialog.ShowDialog() if res.HasValue && res.Value then - let srcImg = state.AddSourceImage(dialog.FileName) + let srcImg = state.AddSourceImage dialog.FileName defaultConfig addPreview srcImg updateGlobalParasitemia () if state.SourceImages.Count() = 1 @@ -373,7 +371,7 @@ let run (defaultConfig: Config) = updateCurrentImage ()) menuStartAnalysis.Click.AddHandler(fun obj args -> - if Analysis.showWindow mainWindow.Root state defaultConfig + if Analysis.showWindow mainWindow.Root state then updateGlobalParasitemia () updateCurrentImage ())