Little adjustments.
[master-thesis.git] / Parasitemia / Parasitemia / Config.fs
index 261d87b..3e3a06c 100644 (file)
@@ -20,16 +20,16 @@ type Parameters = {
 
     // Parasites detection.
     darkStainLevel: float
+    maxDarkStainRatio: float
 
     stainArea: float // Factor of a RBC area. 0.5 means the half of RBC area.
     stainLevel: float // [0, 1]
+    maxStainRatio: float // [0, 1]
 
     infectionArea: float // Factor of a RBC area. 0.5 means the half of RBC area.
     infectionLevel: float // [0, 1]
     parasitePixelsRequired: int
 
-    maxDarkStainRatio: float
-
     standardDeviationMaxRatio: float // The standard deviation of the pixel values of a cell can't be greater than standardDeviationMaxRatio * global standard deviation
     minimumCellArea: float // Factor of RBC area.
 }
@@ -42,7 +42,8 @@ type Config (param: Parameters) =
     member this.RBCMinRadius = this.RBCRadius + param.minRbcRadius * this.RBCRadius
     member this.RBCMaxRadius = this.RBCRadius + param.maxRbcRadius * this.RBCRadius
 
-    member this.RBCMinArea = param.minimumCellArea * Math.PI * this.RBCRadius ** 2.0
+    member this.RBCArea = Math.PI * this.RBCRadius ** 2.0
+    member this.RBCMinArea = param.minimumCellArea * this.RBCArea
 
-    member this.InfectionArea = param.infectionArea * Math.PI * this.RBCRadius ** 2.0
-    member this.StainArea = param.stainArea * Math.PI * this.RBCRadius ** 2.0
+    member this.InfectionArea = param.infectionArea * this.RBCArea
+    member this.StainArea = param.stainArea * this.RBCArea