X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemiaCore%2FAnalysis.fs;h=19a92fef82e58ab72a1ad2449044c64986b3a861;hp=8b16c458952621cb7cf2910b0431216f0bd5285f;hb=d3f9cd7b16d25f49bd8d06394b0f1d4040809fbd;hpb=a6aee26e20f3b24e6b07120cf95a7221dc072778
diff --git a/Parasitemia/ParasitemiaCore/Analysis.fs b/Parasitemia/ParasitemiaCore/Analysis.fs
index 8b16c45..19a92fe 100644
--- a/Parasitemia/ParasitemiaCore/Analysis.fs
+++ b/Parasitemia/ParasitemiaCore/Analysis.fs
@@ -27,7 +27,7 @@ open Types
/// The first call returning 'false' will cancel the analysis.
/// The 'int' parameter correspond to the progression from 0 to 100
/// A list of detected cells or nothing if the process has been cancelled
-let doAnalysis (img : Image) (name : string) (config : Config) (reportProgress : (int -> bool) option) : Cell list option =
+let doAnalysis (img : Image) (name : string) (config : Config) (reportProgress : (int -> bool) option) : AnalysisResult option =
// To report the progress of this function from 0 to 100.
// Return 'None' if the process must be aborted.
@@ -153,7 +153,14 @@ let doAnalysis (img : Image) (name : string) (config : Config) (repor
IO.saveImg img_float.[0] (buildFileName " - source - blue.png")
| _ -> ()
- return cells
+ return
+ {
+ Cells = cells
+ RBCSize_μm = config.RBCRadius.μm
+ RBCSize_px = config.RBCRadius.Pixel
+ }
+
+ //return cells
}
///
@@ -164,7 +171,7 @@ let doAnalysis (img : Image) (name : string) (config : Config) (repor
/// The first call returning 'false' will cancel the analysis.
/// The 'int' parameter correspond to the progression from 0 to 100
/// 'None' if the process has been cancelled or the list of result as (name * cells), 'name' corresponds to the given name
-let doMultipleAnalysis (imgs : (string * Config * Image) list) (reportProgress : (int -> bool) option) : (string * Cell list) list option =
+let doMultipleAnalysis (imgs : (string * Config * Image) list) (reportProgress : (int -> bool) option) : (string * AnalysisResult) list option =
let report (percent : int) : bool =
match reportProgress with
| Some f -> f percent