X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=Parasitemia%2FParasitemiaUI%2FState.fs;h=5b6a91cd12bdd331c525589d83a89b91d50b0104;hb=828e126c88524d3dc123abc966a132532aed118b;hp=96dfc2459465ddfe373b6d064cab4c2492d54160;hpb=c4a76a01f62568c6353396ff85551a3151fc5236;p=master-thesis.git diff --git a/Parasitemia/ParasitemiaUI/State.fs b/Parasitemia/ParasitemiaUI/State.fs index 96dfc24..5b6a91c 100644 --- a/Parasitemia/ParasitemiaUI/State.fs +++ b/Parasitemia/ParasitemiaUI/State.fs @@ -9,7 +9,7 @@ open Emgu.CV.Structure open Types -type State () = +type State (defaultConfig: ParasitemiaCore.Config.Config) = let sourceImages = List() let mutable alteredSinceLastSave = false let mutable patientID = "" @@ -77,7 +77,7 @@ type State () = /// /// If the file cannot be loaded member this.Load () = - let data = PiaZ.load this.FilePath + let data = PiaZ.load this.FilePath defaultConfig this.PatientID <- data.patientID sourceImages.Clear() sourceImages.InsertRange(0, data.images) @@ -142,7 +142,7 @@ type State () = sourceImage.rbcs <- cells |> List.filter (fun cell -> match cell.cellClass with ParasitemiaCore.Types.HealthyRBC | ParasitemiaCore.Types.InfectedRBC -> true | _ -> false ) - |> List.sortByDescending (fun cell -> cell.infectedArea, (w - cell.center.X) + (h - cell.center.Y)) + |> List.sortByDescending (fun cell -> cell.nucleusArea, (w - cell.center.X) + (h - cell.center.Y)) |> List.mapi (fun i cell -> let center = Point(float cell.center.X, float cell.center.Y) let infected, setManually = @@ -155,7 +155,7 @@ type State () = setManually = setManually center = center size = Size(float cell.elements.Width, float cell.elements.Height) - infectedArea = cell.infectedArea }) + infectedArea = cell.nucleusArea }) alteredSinceLastSave <- true