Use two radius in the configuration, one computed with the image resolution and one...
[master-thesis.git] / Parasitemia / Parasitemia / GUI / State.fs
index 3b9d11e..45272ca 100644 (file)
@@ -91,7 +91,7 @@ type State () =
 
         // To match with previously manually altered RBC.
         let manuallyAlteredPreviousRBCS = sourceImage.rbcs |> List.filter (fun rbc -> rbc.setManually)
 
         // To match with previously manually altered RBC.
         let manuallyAlteredPreviousRBCS = sourceImage.rbcs |> List.filter (fun rbc -> rbc.setManually)
-        let tolerance = (float sourceImage.config.RBCRadius) * 0.5 // +/-.
+        let tolerance = (float sourceImage.config.RBCRadius.Pixel) * 0.5 // +/-.
         let getPreviousRBC (center: Point) : RBC option =
             manuallyAlteredPreviousRBCS |> List.tryFind (fun rbc -> rbc.center.X > center.X - tolerance && rbc.center.X < center.X + tolerance &&
                                                                     rbc.center.Y > center.Y - tolerance && rbc.center.Y < center.Y + tolerance)
         let getPreviousRBC (center: Point) : RBC option =
             manuallyAlteredPreviousRBCS |> List.tryFind (fun rbc -> rbc.center.X > center.X - tolerance && rbc.center.X < center.X + tolerance &&
                                                                     rbc.center.Y > center.Y - tolerance && rbc.center.Y < center.Y + tolerance)