コード例 #1
0
ファイル: FeaturesLayer.cs プロジェクト: esheleg/PhotoSelect
        public FeaturesLayer(ref Task task)
        {
            _disposed = false;
            // copy task
            _task = new Task(task);
            // init results struct
            _res = new Results();

            _numRunningFeat = 0;
            // features vars
            _bitExactThread = null;
            _bitExact = null;
            _badContrast = null;
            _badContrastThread = null;
            // ---------------
            // set status to 0
            _loadingImagesStatus = 0;
            _runStatus = 0;
            // allocate memory for ImageInfo array
            _images = new ImageInfo[task.ImagePathes.Count];
            for(int i=0; i<_images.Length; i++)
                _images[i] = null;
            // this will run loading images from run()
            _loadingImagesThread = null;
        }
コード例 #2
0
 public void TestResultsStructure()
 {
     Results res = new Results();
     List<List<string>> lst = new List<List<string>>(10);
     for (int i = 0; i < 10; i++)
     {
         lst.Add(new List<string>(10));
         for (int j = 0; j < 10; j++)
         {
             lst.Last().Add("afdasdasd");
         }
     }
     BitExactRes bRes = new BitExactRes(lst);
     res.setBitExact(bRes);
     foreach (List<string> ll in res.BitExact.Matches)
     {
         foreach (string str in ll)
             Debug.WriteLine(str + " ");
     }
     List<List<string>> l = res.BitExact.Matches;
 }