X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemia%2FGUI%2FPia.fs;h=432bad9141dff61e97a73a8322a1e0d521b0b4fa;hp=9ddd063c37d557903c6bf74412832f509e41bfd1;hb=0af5da4bffad8333c8e57851e067218c0e21d7bb;hpb=da6b1ee15d0368ef9f2d9734b0d72996cbc227d8 diff --git a/Parasitemia/Parasitemia/GUI/Pia.fs b/Parasitemia/Parasitemia/GUI/Pia.fs index 9ddd063..432bad9 100644 --- a/Parasitemia/Parasitemia/GUI/Pia.fs +++ b/Parasitemia/Parasitemia/GUI/Pia.fs @@ -1,5 +1,5 @@ // ParasitemIA file format. -module Pia +module Parasitemia.GUI.Pia open System.Drawing open System.IO @@ -10,31 +10,30 @@ open FSharp.Data open Emgu.CV open Emgu.CV.Structure +open Types + let extension = ".pia" let filter = "PIA|*.pia" -type RBC = { - infected: bool - addedManually: bool - removed: bool - - center: Point - size: Size - stainArea: int } - -type ImageSource = { - img: Image - rbcs: RBC list } - type FileData = { - sources: ImageSource list + sources: SourceImage list patientID: string } // The json type associated to a source image. type JSONSourceImage = JsonProvider<""" { "rbcs": [ - { "infected": true, "addedManually": false, "removed": false, "posX" : 42, "posY" : 42, "width" : 10, "height" : 10, "stainArea" : 10 } + { + "num": 1, + "infected": true, + "addedManually": false, + "removed": false, + "posX" : 42, + "posY" : 42, + "width" : 10, + "height" : 10, + "stainArea" : 10 + } ] } """>