* Add the possibility to set an RBC as healthy or infected
[master-thesis.git] / Parasitemia / Parasitemia / GUI / Types.fs
index e912ad3..6e00586 100644 (file)
@@ -8,12 +8,17 @@ open Emgu.CV.Structure
 type RBC = {
     num: int
 
-    infected: bool
-    setManually: bool
+    mutable infected: bool
+    mutable setManually: bool
 
     center: Point
     size: Size
-    stainArea: int }
+    infectedArea: int } with
+    member this.SetAsInfected (infected: bool) =
+        if infected <> this.infected
+        then
+            this.infected <- infected
+            this.setManually <- not this.setManually
 
 type SourceImage = {
     num: int