示例#1
0
 /// <summary>
 /// adds jobs to the job manager and does the old training offline processing.
 /// </summary>
 /// <returns></returns>
 public bool testGLM()
 {
     JobManager.addFeatureProcess("Glm");
     JobManager.addFeatureProcess("Voxelize");
     Training_OLDProcessing.OfflineProcess();
     return(true);
 }
示例#2
0
        public void loadRawDataUsing_UDP(IAsyncResult ar)
        {
            if (shouldStop)
            {
                return;
            }

            byte[] data = Preferences.Instance.udp.EndReceive(ar);

            if (data.Length > 0)
            {
                string text = Encoding.ASCII.GetString(data);
                int    loc1 = text.LastIndexOf("\\");
                int    loc2 = text.LastIndexOf(".");
                int    loc3 = text.LastIndexOf("-");
                int    loc4 = text.LastIndexOf(",");

                if (Preferences.Instance.ProblemOriginal.samples == null)
                {
                    Preferences.Instance.ProblemOriginal = new libSVM_ExtendedProblem();
                    GC.Collect();
                    int totalToProcess = Int32.Parse(text.Substring(loc4 + 1, text.Length - (loc4 + 1)));
                    GuiPreferences.Instance.ProgressBarMax = totalToProcess;
                    //loading just the amount of data we need, so we assign accordingly, not this>Program.mainForm.getMaxAvailableTrs()
                    Preferences.Instance.ProblemOriginal.PrepareSamplesLabelsSize(totalToProcess);
                }

                string path = text.Substring(0, loc1 + 1);
                fileName   = text.Substring(loc1 + 1, loc2 - loc1 - 1);
                last_index = Int32.Parse(text.Substring(loc3 + 1, loc2 - loc3 - 1));

                if (last_index <= GuiPreferences.Instance.ToTR)
                {
                    //report progress
                    // DLL GUI Seperation
                    //Program.mainForm.progressBar1.Value = i - GuiPreferences.Instance.FromTR + 1 ;
                    GuiPreferences.Instance.ProgressBarValue = last_index;
                    fileName = GuiPreferences.Instance.WorkDirectory + GuiPreferences.Instance.FileName + last_index.ToString() + ".vdat";
                    loadRawFileName(fileName);
                    Training_OLDProcessing.OfflineProcess();
                    //Preferences.Instance.pipeClient.Send(fileName);
                    GuiPreferences.Instance.setLog("Sending Vector " + last_index.ToString());
                    last_index++;
                }
                else
                {
                    shouldStop = true;
                }


                //updategui();
                // shoot event
                //send the recieved data somewhere
            }

            if (!shouldStop)
            {
                Preferences.Instance.udp.BeginReceive();
            }
        }