X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemia%2FConfig.fs;h=aa8f0e5edeecbf09d2752edc4f73e3981dad010b;hp=45b1ca3e303e3846b170b02f70143d712c6fc91a;hb=044b0ae69df3ac565432545b2fa934589016f9bd;hpb=f9ee9f2c0c1194a6a8f7475ee2ca0b7076b32261 diff --git a/Parasitemia/Parasitemia/Config.fs b/Parasitemia/Parasitemia/Config.fs index 45b1ca3..aa8f0e5 100644 --- a/Parasitemia/Parasitemia/Config.fs +++ b/Parasitemia/Parasitemia/Config.fs @@ -2,6 +2,8 @@ open System +open Const + type Debug = | DebugOff | DebugOn of string // Output directory. @@ -9,40 +11,44 @@ type Debug = type Parameters = { scale: float - minRbcRadius: float - maxRbcRadius: float + initialAreaOpen: int + + minRbcRadius: float32 + maxRbcRadius: float32 preFilterSigma: float // Ellipse. factorNbPick: float - factorWindowSize: float // factor of 'maxRBCSize'. // Parasites detection. darkStainLevel: float maxDarkStainRatio: float - stainArea: float // Factor of a RBC area. 0.5 means the half of RBC area. + stainArea: float32 // 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. + 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: float // Factor of RBC area. + minimumCellArea: float32 // Factor of the nominal RBC area. } type Config (param: Parameters) = member this.Parameters = param member val Debug = DebugOff with get, set - member val RBCRadius = 30. with get, set + member val RBCRadius = 30.f with get, set member this.RBCMinRadius = this.RBCRadius + param.minRbcRadius * this.RBCRadius member this.RBCMaxRadius = this.RBCRadius + param.maxRbcRadius * this.RBCRadius - member this.RBCArea = Math.PI * this.RBCRadius ** 2.0 + member this.RBCArea = PI * this.RBCRadius ** 2.f member this.RBCMinArea = param.minimumCellArea * this.RBCArea member this.InfectionArea = param.infectionArea * this.RBCArea member this.StainArea = param.stainArea * this.RBCArea + + member this.Copy () = + this.MemberwiseClone() :?> Config