+ member this.ImageManuallyChangedRBC (srcImg : SourceImage) (setAsInfected : bool) : int seq =
+ query {
+ for rbc in srcImg.rbcs do
+ where (rbc.setManually && rbc.infected = setAsInfected)
+ select rbc.num
+ }
+
+ member this.ImageManuallyChangedRBCStr (srcImg : SourceImage) (setAsInfected : bool) : string =
+ let listStr = Utils.listAsStr <| this.ImageManuallyChangedRBC srcImg setAsInfected
+ if listStr = "" then
+ ""
+ else
+ "[" + listStr + "]"
+
+ member this.GlobalParasitemia : int * int =
+ sourceImages
+ |> Seq.fold (
+ fun (nbTotal, nbTotalInfected) srcImg ->
+ let nb, nbInfected = this.ImageParasitemia srcImg
+ nbTotal + nb, nbTotalInfected + nbInfected
+ ) (0, 0)
+
+ member this.SetAsInfected (rbc : RBC) (infected : bool) =
+ if infected <> rbc.infected then