Add an option to change the brightness of the highlight box color (healthy/infected...
[master-thesis.git] / Parasitemia / ParasitemiaUI / State.fs
index f133640..63b9bbf 100644 (file)
@@ -73,7 +73,15 @@ type State () =
     /// </summary>
     /// <exception cref="System.IOException">If the image cannot be read</exception>
     member this.AddSourceImage (filePath: string) (defaultConfig: ParasitemiaCore.Config.Config) : SourceImage =
-        let srcImg = { num = sourceImages.Count + 1; config = defaultConfig.Copy(); dateLastAnalysis = DateTime(0L); rbcs = []; img = new Image<Bgr, byte>(filePath) }
+        let srcImg =
+            { num = sourceImages.Count + 1
+              config = defaultConfig.Copy()
+              dateLastAnalysis = DateTime(0L)
+              rbcs = []
+              img = new Image<Bgr, byte>(filePath)
+              healthyRBCBrightness = 1.f
+              infectedRBCBrightness = 1.f }
+
         sourceImages.Add(srcImg)
         if sourceImages.Count = 1
         then this.CurrentImage <- Some sourceImages.[0]