Matlab functions for accessing BCI2000 .dat format
Posted: 10 Dec 2012, 13:30
Dear BCI2000 developers,
I'm managing the developments of the Brainstorm software for MEG/EEG analysis (http://neuroimage.usc.edu/brainstorm, ~7000 users worldwide).
One of our users asked last week on our forum how he could import BCI2000 .dat files in Brainstorm. We are offering support for a wide range of MEG and EEG systems, but not for BCI2000 yet.
For all those formats, I integrated or developed specific functions for reading efficiently small blocks of recordings from the files, to be able to dynamically browse through continuous long recordings. The I/O functions are integrated tighter in the software core than in EEGLAB.
I was wondering if you also had all-matlab or -java based versions available for those functions, that do not rely on any compiled library, or if you were planning to develop some.
I would need just two functions: one that reads the header and the sensors descriptions, and one that reads an arbitrary segment of time in a long continuous file.
I've seen that you're offering a plug-in for EEGLAB, that is based on pre-compiled mex functions in your distribution.
But I found out in the past that offering long-term support for pre-compiled mex files was a nightmare on many platforms, and the total size of your mex folder is over 10Mb. It is too big for me to integrate in the Brainstorm distribution, and I don't like too much this idea of having to download and install external plug-ins, I would prefer to keep Brainstorm as a 100% plug and play software.
For file reading, there are ways to write pure Matlab code (or Java code in Matlab scripts) that runs almost as fast as compiled code. If you avoid loops, the vectorized calls to fread/fseek are not so far behind the system calls performance.
Would you be interested in working on some code that we could share?
For now, is there an easy way for your users to export the BCI2000 recordings to some other format that Brainstorm could read (like EDF)?
Let me know what you think.
Cheers,
Francois
I'm managing the developments of the Brainstorm software for MEG/EEG analysis (http://neuroimage.usc.edu/brainstorm, ~7000 users worldwide).
One of our users asked last week on our forum how he could import BCI2000 .dat files in Brainstorm. We are offering support for a wide range of MEG and EEG systems, but not for BCI2000 yet.
For all those formats, I integrated or developed specific functions for reading efficiently small blocks of recordings from the files, to be able to dynamically browse through continuous long recordings. The I/O functions are integrated tighter in the software core than in EEGLAB.
I was wondering if you also had all-matlab or -java based versions available for those functions, that do not rely on any compiled library, or if you were planning to develop some.
I would need just two functions: one that reads the header and the sensors descriptions, and one that reads an arbitrary segment of time in a long continuous file.
I've seen that you're offering a plug-in for EEGLAB, that is based on pre-compiled mex functions in your distribution.
But I found out in the past that offering long-term support for pre-compiled mex files was a nightmare on many platforms, and the total size of your mex folder is over 10Mb. It is too big for me to integrate in the Brainstorm distribution, and I don't like too much this idea of having to download and install external plug-ins, I would prefer to keep Brainstorm as a 100% plug and play software.
For file reading, there are ways to write pure Matlab code (or Java code in Matlab scripts) that runs almost as fast as compiled code. If you avoid loops, the vectorized calls to fread/fseek are not so far behind the system calls performance.
Would you be interested in working on some code that we could share?
For now, is there an easy way for your users to export the BCI2000 recordings to some other format that Brainstorm could read (like EDF)?
Let me know what you think.
Cheers,
Francois