Replace F# list by List<T> for KdTree.
[master-thesis.git] / Parasitemia / ParasitemiaCore / Classifier.fs
index a2d9e4f..b01a041 100644 (file)
@@ -5,7 +5,6 @@ open System.Collections.Generic
 open System.Drawing
 
 open Emgu.CV
-open Emgu.CV.Structure
 
 open Types
 open Utils
@@ -91,7 +90,7 @@ let findCells (ellipses : Ellipse list) (parasites : ParasitesMarker.Result) (wi
             if e.State <> CellState.Removed then
                 tree.Search (searchRegion e)
                     // We only keep the ellipses touching 'e'.
-                    |> List.choose (
+                    |> Seq.choose (
                         fun otherE ->
                             if e <> otherE then
                                 match EEOver.EEOverlapArea e otherE with
@@ -105,6 +104,7 @@ let findCells (ellipses : Ellipse list) (parasites : ParasitesMarker.Result) (wi
                             else
                                 None
                     )
+                    |> List.ofSeq
             else
                 []