projects
/
master-thesis.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove the dependency to ViewModule
[master-thesis.git]
/
Parasitemia
/
ParasitemiaUI
/
SourceImage.fs
diff --git
a/Parasitemia/ParasitemiaUI/SourceImage.fs
b/Parasitemia/ParasitemiaUI/SourceImage.fs
index
2330227
..
7f5c245
100644
(file)
--- a/
Parasitemia/ParasitemiaUI/SourceImage.fs
+++ b/
Parasitemia/ParasitemiaUI/SourceImage.fs
@@
-1,7
+1,6
@@
namespace ParasitemiaUI
open System
namespace ParasitemiaUI
open System
-open System.Windows
open System.Windows.Media
open Emgu.CV
open System.Windows.Media
open Emgu.CV
@@
-25,16
+24,19
@@
type SourceImage (num : int, name : string, config : ParasitemiaCore.Config.Conf
let infectedRBColor = Color.FromRgb (255uy, 0uy, 40uy) // Red with a bit of blue.
let updateAverageRBCSize () =
let infectedRBColor = Color.FromRgb (255uy, 0uy, 40uy) // Red with a bit of blue.
let updateAverageRBCSize () =
- averageRBCSize <-
- rbcs
- |> List.collect (fun rbc -> [ rbc.size.Width; rbc.size.Height ])
- |> List.average
+ if List.isEmpty rbcs |> not then
+ averageRBCSize <-
+ rbcs
+ |> List.collect (fun rbc -> [ rbc.size.Width; rbc.size.Height ])
+ |> List.average
do
updateAverageRBCSize ()
member this.Num with get () = num and set value = num <- value
do
updateAverageRBCSize ()
member this.Num with get () = num and set value = num <- value
+ member this.RomanNum = Utils.toRomanNumber this.Num
+
member this.Name with get () = name and set value = name <- value
member this.Config = config
member this.Name with get () = name and set value = name <- value
member this.Config = config
@@
-45,7
+47,9
@@
type SourceImage (num : int, name : string, config : ParasitemiaCore.Config.Conf
member this.RBCs
with get () = rbcs
member this.RBCs
with get () = rbcs
- and set value = rbcs <- value
+ and set value =
+ rbcs <- value
+ updateAverageRBCSize ()
member this.ImageParasitemia : int * int =
List.length rbcs,
member this.ImageParasitemia : int * int =
List.length rbcs,