+ 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 + "]"