- member this.ImageParasitemia (srcImg: SourceImage) : int * int =
- List.length srcImg.rbcs,
- srcImg.rbcs |> List.fold (fun nbInfected rbc -> if rbc.infected then nbInfected + 1 else nbInfected) 0
-
- member this.ImageNbManuallyChangedRBC (srcImg: SourceImage) (setAsInfected: bool) : int * int =
- List.length srcImg.rbcs,
- srcImg.rbcs |> List.fold (fun nb rbc -> if rbc.setManually && rbc.infected = setAsInfected then nb + 1 else nb) 0
-
- member this.ImageNbManuallyChangedRBCStr (srcImg: SourceImage) (setAsInfected: bool) : string =
- Utils.percentText (this.ImageNbManuallyChangedRBC srcImg setAsInfected)
-
- 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 + "]"
-