Cleaning.
[master-thesis.git] / Parasitemia / Parasitemia / Config.fs
index 55e142c..7f841c4 100644 (file)
@@ -9,6 +9,8 @@ type Debug =
 type Parameters = {
     scale: float
 
+    initialAreaOpen: int
+
     minRbcRadius: float
     maxRbcRadius: float
 
@@ -20,28 +22,29 @@ 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]
+    stainLevel: float // > 1
+    maxStainRatio: float // [0, 1]
 
     infectionArea: float // Factor of a RBC area. 0.5 means the half of RBC area.
-    infectionLevel: float // [0, 1]
-    infectionPixelsRequired: int
-
-    maxDarkStainRatio: float
+    infectionLevel: float // > 1
 
-    minimumCellArea: float // Factor of RBC area.
+    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 the nominal RBC area.
 }
 
 type Config (param: Parameters) =
     member this.Parameters = param
     member val Debug = DebugOff with get, set
-    member val RBCSize = 30. with get, set
+    member val RBCRadius = 30. with get, set
 
-    member this.RBCMin = this.RBCSize + param.minRbcRadius * this.RBCSize
-    member this.RBCMax = this.RBCSize + param.maxRbcRadius * this.RBCSize
+    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.RBCSize ** 2.0
+    member this.RBCArea = Math.PI * this.RBCRadius ** 2.0
+    member this.RBCMinArea = param.minimumCellArea * this.RBCArea
 
-    member this.ParasiteArea = param.infectionArea * Math.PI * this.RBCSize ** 2.0
-    member this.StainArea = param.stainArea * Math.PI * this.RBCSize ** 2.0
+    member this.InfectionArea = param.infectionArea * this.RBCArea
+    member this.StainArea = param.stainArea * this.RBCArea