X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemia%2FGUI%2FState.fs;h=b5136c2269d93d3e74c16f0056b48d00e4d41882;hp=a4a1773c8e17f378f0c524b04a394b28061487ae;hb=da6b1ee15d0368ef9f2d9734b0d72996cbc227d8;hpb=3ddaf64dc5ba6a7066a279ad75b9a1ee72194639 diff --git a/Parasitemia/Parasitemia/GUI/State.fs b/Parasitemia/Parasitemia/GUI/State.fs index a4a1773..b5136c2 100644 --- a/Parasitemia/Parasitemia/GUI/State.fs +++ b/Parasitemia/Parasitemia/GUI/State.fs @@ -2,8 +2,15 @@ open System.Collections.Generic +open Emgu.CV +open Emgu.CV.Structure + +type ImageSource = { + cells: List + img: Image } + type State () = - let cells = List() + let imagesSource = List() member val FilePath: string = "" with get, set member val PatientID: string = "" with get, set @@ -14,4 +21,14 @@ type State () = member this.Load () = let data = Pia.load this.FilePath - this.PatientID <- data.patientID \ No newline at end of file + this.PatientID <- data.patientID + + member this.AddSourceImage (filePath: string) = + imagesSource.Add({ cells = List(); img = new Image(filePath) }) + + member x.ImagesSource : ImageSource seq = + imagesSource :> ImageSource seq + + member this.Reset () = + this.PatientID <- "" + imagesSource.Clear() \ No newline at end of file