+let defaultParameters = {
+ rbcDiameter = 8.<μm>
+ resolution = 220.e3<ppi> // Correspond to 50X.
+
+ ratioAreaPaleCenter = 1.f / 3.f // The ratio between an RBC area and the area of the its pale center.
+
+ granulometryRange = 0.5f
+
+ minRbcRadius = -0.3f
+ maxRbcRadius = 0.3f
+
+ LPFStandardDeviation = 0.2<μm> // 8.5e-6<inch>.
+
+ factorNbPick = 1.0
+
+ darkStainLevel = 0.25 // 0.3
+ maxDarkStainRatio = 0.1 // 10 %
+
+ infectionArea = 0.012f // 1.2 %
+ infectionSensitivity = 0.9
+
+ stainArea = 0.08f // 8 %
+ stainSensitivity = 0.9
+ maxStainRatio = 0.12 // 12 %
+
+ standardDeviationMaxRatio = 0.5 // 0.5
+ minimumCellAreaFactor = 0.4f }
+
+type RBCRadius (radius: float32, parameters: Parameters) =
+ member this.Pixel = radius
+ member this.μm : float<μm> =
+ 1.<px> * (float radius) / parameters.resolution |> inchToμm
+
+ member this.Min = radius + parameters.minRbcRadius * radius
+ member this.Max = radius + parameters.maxRbcRadius * radius
+
+ member this.Area = PI * radius ** 2.f
+ member this.MinArea = parameters.minimumCellAreaFactor * radius
+
+ member this.InfectionArea = parameters.infectionArea * this.Area
+ member this.StainArea = parameters.stainArea * this.Area
+
+ override this.ToString() =
+ sprintf "%d px (%.1f μm)" (Utils.roundInt <| 2.f * radius) (2. * this.μm)
+