// ParasitemIA file format.
-module Pia
+module Parasitemia.GUI.Pia
open System.Drawing
open System.IO
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<Bgr, byte>
- 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
+ }
]
}
""">