module ParasitemiaUI.Types open System.Windows open Newtonsoft.Json open ParasitemiaCore.UnitsOfMeasure type RBC = { num : int [] mutable infected : bool [] mutable setManually : bool center : Point size : Size infectedArea : int } type PredefinedPPI = { ppi : int label : string } override this.ToString () = sprintf "%s: %d" this.label this.ppi type SensorSize = { w : float h : float label : string } override this.ToString () = sprintf "%g mm × %g mm%s" this.w this.h (if this.label = "" then "" else " (" + this.label + ")") let defaultPredefinedPPI = [ { ppi = 230000; label = "50×" } { ppi = 460000; label = "100×" } ] let defaultSensorSizes = [ { w = 3.2; h = 2.4; label = "1/4″" } { w = 4.8; h = 3.6; label = "1/3″" } { w = 5.76; h = 4.29; label = "1/2.5″" } { w = 6.4; h = 4.8; label = "1/2″" } { w = 7.18; h = 5.32; label = "1/1.8″" } { w = 7.6; h = 5.7; label = "1/1.7″" } { w = 8.8; h = 6.6; label = "2/3″" } { w = 13.2; h = 8.8; label = "1″" } ]