X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemia%2FConfig.fs;h=7f841c4402140cca42737b4512ef34aabda5438a;hp=48a6334ceb76f0e2d5a03111f0f9087fe7c466f7;hb=962440dfe579569ba7e3ebba6f878cb575d1fc02;hpb=5ac2dedf8ead5275ac216e0b41829ab39c843800 diff --git a/Parasitemia/Parasitemia/Config.fs b/Parasitemia/Parasitemia/Config.fs index 48a6334..7f841c4 100644 --- a/Parasitemia/Parasitemia/Config.fs +++ b/Parasitemia/Parasitemia/Config.fs @@ -1,16 +1,18 @@ module Config +open System + type Debug = | DebugOff | DebugOn of string // Output directory. -type Config = { - debug: Debug - +type Parameters = { scale: float - minRBCSize: float - maxRBCSize: float + initialAreaOpen: int + + minRbcRadius: float + maxRbcRadius: float preFilterSigma: float @@ -20,19 +22,29 @@ type Config = { // Parasites detection. darkStainLevel: float + maxDarkStainRatio: float + + stainArea: float // Factor of a RBC area. 0.5 means the half of RBC area. + stainLevel: float // > 1 + maxStainRatio: float // [0, 1] + + infectionArea: float // Factor of a RBC area. 0.5 means the half of RBC area. + infectionLevel: float // > 1 - stainSigma: float - stainLevel: float - stainSpreadRequired: 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 the nominal 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.RBCArea = Math.PI * this.RBCRadius ** 2.0 + member this.RBCMinArea = param.minimumCellArea * this.RBCArea - minimumCellArea: int - maxOffcenter: float -} \ No newline at end of file + member this.InfectionArea = param.infectionArea * this.RBCArea + member this.StainArea = param.stainArea * this.RBCArea