open Types
-type State () =
+type State (defaultConfig: ParasitemiaCore.Config.Config) =
let sourceImages = List<SourceImage>()
let mutable alteredSinceLastSave = false
let mutable patientID = ""
/// </summary>
/// <exception cref="System.IOException">If the file cannot be loaded</exception>
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)
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 =
setManually = setManually
center = center
size = Size(float cell.elements.Width, float cell.elements.Height)
- infectedArea = cell.infectedArea })
+ infectedArea = cell.nucleusArea })
alteredSinceLastSave <- true