10 | DebugOn of string // Output directory.
13 rbcDiameter
: float<μm
>
14 resolution
: float<ppi
>
16 ratioAreaPaleCenter
: float32
// The area of the second opening is 'ratioSecondAreaOpen' * mean RBC area. It's applied only if greater than 'initialAreaOpen'.
18 granulometryRange
: float32
// The radius will be seeked from radius - granulometryRange * radius to radius + granulometryRange * radius.
20 minRbcRadius
: float32
// Factor of the mean RBC radius.
21 maxRbcRadius
: float32
// Factor of the mean RBC radius.
23 LPFStandardDeviation: float<μm
> // Sigma parameter of the gaussian to remove the high frequency noise.
26 factorNbPick
: float // The number of computed ellipse per edge pixel.
28 // Parasites detection.
29 darkStainLevel
: float // Lower -> more sensitive. Careful about illumination on the borders.
30 maxDarkStainRatio
: float // When a cell must own less than this ratio to be a RBC.
32 stainArea
: float32
// Factor of a RBC area. 0.5 means the half of RBC area.
33 stainLevel
: float // > 1
34 maxStainRatio
: float // When a cell must own less than this ratio to be a RBC.
36 infectionArea
: float32
// Factor of a RBC area. 0.5 means the half of RBC area.
37 infectionLevel
: float // > 1
39 standardDeviationMaxRatio
: float // The standard deviation of the pixel values of a cell can't be greater than standardDeviationMaxRatio * global standard deviation
40 minimumCellAreaFactor
: float32
// Factor of the mean RBC area.
43 let defaultParameters = {
45 resolution
= 200.e3
<ppi
> // Correspond to 50X.
47 ratioAreaPaleCenter
= 1.f
/ 3.f
// The ratio between an RBC area and the area of the its pale center.
49 granulometryRange
= 0.5f
54 LPFStandardDeviation = 0.2<μm
> // 8.5e-6<inch>.
58 darkStainLevel
= 0.25 // 0.3
59 maxDarkStainRatio
= 0.1 // 10 %
61 infectionArea
= 0.012f // 1.2 %
62 infectionLevel
= 1.12 // Lower -> more sensitive.
64 stainArea
= 0.08f // 8 %
65 stainLevel
= 1.1 // Lower -> more sensitive.
66 maxStainRatio
= 0.12 // 12 %
68 standardDeviationMaxRatio
= 0.5 // 0.5
69 minimumCellAreaFactor
= 0.4f }
71 type Config (param
: Parameters) =
72 let initialRBCRadius : float32
=
73 let rbcRadiusInch: float<inch
> = μm
.ConvertToInch(param
.rbcDiameter
) / 2.
74 let rbcRadiusPx: float<px
> = param
.resolution
* rbcRadiusInch
77 member this
.Parameters = param
78 member val Debug = DebugOff with get
, set
80 member this
.LPFStandardDeviation =
81 let stdDeviation: float<px
> = μm
.ConvertToInch(param
.LPFStandardDeviation) * param
.resolution
85 member val RBCRadius : float32
= initialRBCRadius with get
, set
87 member this
.RBCMinRadius = this
.RBCRadius + param
.minRbcRadius
* this
.RBCRadius
88 member this
.RBCMaxRadius = this
.RBCRadius + param
.maxRbcRadius
* this
.RBCRadius
90 member this
.RBCArea = PI * this
.RBCRadius ** 2.f
91 member this
.RBCMinArea = param
.minimumCellAreaFactor
* this
.RBCArea
93 member this
.InfectionArea = param
.infectionArea
* this
.RBCArea
94 member this
.StainArea = param
.stainArea
* this
.RBCArea
97 this
.MemberwiseClone() :?> Config