X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemia%2FConfig.fs;h=aa8f0e5edeecbf09d2752edc4f73e3981dad010b;hp=464fd7e810a7b960e2cb1a93bd761007c8402f9d;hb=044b0ae69df3ac565432545b2fa934589016f9bd;hpb=10afa9a402eb88c8e073fe8b0d607faa25230eef diff --git a/Parasitemia/Parasitemia/Config.fs b/Parasitemia/Parasitemia/Config.fs index 464fd7e..aa8f0e5 100644 --- a/Parasitemia/Parasitemia/Config.fs +++ b/Parasitemia/Parasitemia/Config.fs @@ -1,40 +1,54 @@ module Config +open System + +open Const + type Debug = | DebugOff | DebugOn of string // Output directory. -type Config = { - debug: Debug - +type Parameters = { scale: float - minRBCSize: float - maxRBCSize: float + initialAreaOpen: int + + minRbcRadius: float32 + maxRbcRadius: float32 - doGSigma1: float - doGSigma2: float - doGLowFreqPercentageReduction: float + preFilterSigma: float // Ellipse. factorNbPick: float - factorWindowSize: float // factor of 'maxRBCSize'. // Parasites detection. darkStainLevel: float + maxDarkStainRatio: float + + stainArea: float32 // Factor of a RBC area. 0.5 means the half of RBC area. + stainLevel: float // > 1 + maxStainRatio: float // [0, 1] + + infectionArea: float32 // Factor of a RBC area. 0.5 means the half of RBC area. + infectionLevel: float // > 1 + + standardDeviationMaxRatio: float // The standard deviation of the pixel values of a cell can't be greater than standardDeviationMaxRatio * global standard deviation + minimumCellArea: float32 // Factor of the nominal RBC area. +} - stainSigma: float - stainLevel: float - stainSpreadRequired: float +type Config (param: Parameters) = + member this.Parameters = param + member val Debug = DebugOff with get, set + member val RBCRadius = 30.f with get, set - infectionSigma: float - infectionLevel: float - infectionPixelsRequired: int + member this.RBCMinRadius = this.RBCRadius + param.minRbcRadius * this.RBCRadius + member this.RBCMaxRadius = this.RBCRadius + param.maxRbcRadius * this.RBCRadius - percentageOfFgValidCell: float + member this.RBCArea = PI * this.RBCRadius ** 2.f + member this.RBCMinArea = param.minimumCellArea * this.RBCArea - MaxDarkStainRatio: float + member this.InfectionArea = param.infectionArea * this.RBCArea + member this.StainArea = param.stainArea * this.RBCArea - minimumCellArea: int - maxOffcenter: float -} \ No newline at end of file + member this.Copy () = + this.MemberwiseClone() :?> Config