X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=Parasitemia%2FParasitemia%2FConfig.fs;h=261d87bb7fb67cd419c47857eeecdb2c33d265b8;hb=21ce317bce2e1b58803bbb1be439161251478568;hp=8a172b8c683df92eb414c5f7e70bcb852fd162cc;hpb=e76da913cd58078ad2479357b2430ed62a6e0777;p=master-thesis.git diff --git a/Parasitemia/Parasitemia/Config.fs b/Parasitemia/Parasitemia/Config.fs index 8a172b8..261d87b 100644 --- a/Parasitemia/Parasitemia/Config.fs +++ b/Parasitemia/Parasitemia/Config.fs @@ -1,36 +1,48 @@ module Config +open System + type Debug = | DebugOff | DebugOn of string // Output directory. -type Config = { - debug: Debug - +type Parameters = { scale: float - minRBCSize: float - maxRBCSize: float + minRbcRadius: float + maxRbcRadius: float + + preFilterSigma: float - doGSigma1: float - doGSigma2: float - doGLowFreqPercentageReduction: float + // Ellipse. + factorNbPick: float + factorWindowSize: float // factor of 'maxRBCSize'. // Parasites detection. darkStainLevel: float - stainSigma: float - stainLevel: float - stainSpreadRequired: float + stainArea: float // Factor of a RBC area. 0.5 means the half of RBC area. + stainLevel: 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. +} - infectionSigma: float - infectionLevel: float - infectionPixelsRequired: int +type Config (param: Parameters) = + member this.Parameters = param + member val Debug = DebugOff with get, set + member val RBCRadius = 30. with get, set - percentageOfFgValidCell: float + member this.RBCMinRadius = this.RBCRadius + param.minRbcRadius * this.RBCRadius + member this.RBCMaxRadius = this.RBCRadius + param.maxRbcRadius * this.RBCRadius - MaxDarkStainRatio: float + member this.RBCMinArea = param.minimumCellArea * Math.PI * this.RBCRadius ** 2.0 - minimumCellArea: int - maxOffcenter: float -} \ No newline at end of file + member this.InfectionArea = param.infectionArea * Math.PI * this.RBCRadius ** 2.0 + member this.StainArea = param.stainArea * Math.PI * this.RBCRadius ** 2.0