コード例 #1
0
ファイル: FormTrace.cs プロジェクト: geoffmay/eegWindows
 void loadData(string filename)
 {
     if (filename != null && filename.Length > 1)
     {
         if (filename.ToLower().EndsWith(".edf") || filename.ToLower().EndsWith(".bdf"))
         {
             m_file = EDFfile.OpenFile(filename);
             int selectorCount = (int)(m_file.m_header.Duration.TotalSeconds * m_file.SamplesPerSecondMax);
             m_selections    = new int[selectorCount];
             m_selectionFile = getDefaultSelectionFilename(filename);
             string outputFile = filename.Substring(0, filename.Length - 3) + "raw";
             convertInBackground(filename, outputFile);
         }
         else
         {
             throw new ArgumentException("unsupported file type");
         }
     }
     if (m_displayChannel == null)
     {
         m_displayChannel = new bool[m_file.NumberOfChannels()];
         for (int i = 0; i < m_displayChannel.Length; i++)
         {
             m_displayChannel[i] = true;
         }
     }
     hScrollBarWindow.Minimum = 0;
     hScrollBarWindow.Maximum = (int)(Math.Ceiling(m_file.m_header.Duration.TotalSeconds));
     drawEeg();
 }
コード例 #2
0
ファイル: FormTrace.cs プロジェクト: geoffmay/eegWindows
 void loadData(string filename)
 {
     if (filename != null && filename.Length > 1)
     {
         if (filename.ToLower().EndsWith(".edf") || filename.ToLower().EndsWith(".bdf"))
         {
             m_file = EDFfile.OpenFile(filename);
             int selectorCount = (int)(m_file.m_header.Duration.TotalSeconds * m_file.SamplesPerSecondMax);
             m_selections = new int[selectorCount];
         }
         else
         {
             throw new ArgumentException("unsupported file type");
         }
     }
     hScrollBarWindow.Minimum = 0;
     hScrollBarWindow.Maximum = (int)(Math.Ceiling(m_file.m_header.Duration.TotalSeconds));
     drawEeg();
 }
コード例 #3
0
ファイル: FormTrace.cs プロジェクト: geoffmay/eegWindows
        public static void convertFile(string input, string output)
        {
            EDFfile file = EDFfile.OpenFile(input, true);

            file.convertToRaw(output);
        }