45025366d91c3eb4d78533cb5ac35b3f49b6bf1d
1
module Parasitemia.GUI.State
3 open System.Collections.Generic
11 let sourceImages = List<SourceImage>()
12 let mutable currentImage = -1
14 member val FilePath: string = "" with get
, set
15 member val PatientID: string = "" with get
, set
18 let data = { Pia.sources
= List.ofSeq
sourceImages; Pia.patientID
= this
.PatientID }
19 Pia.save
this.FilePath data
22 let data = Pia.load
this.FilePath
23 this.PatientID <- data.patientID
25 sourceImages.InsertRange(0, data.sources
)
27 member this.AddSourceImage (filePath
: string) : SourceImage =
28 let srcImg = { num
= sourceImages.Count + 1; rbcs
= []; img
= new Image<Bgr, byte
>(filePath
) }
29 sourceImages.Add(srcImg)
30 if sourceImages.Count = 1
35 member x
.SourceImages : SourceImage seq =
36 sourceImages :> SourceImage seq
38 member this.Reset () =