Page 1 of 1

How to setup FieldTripBuffer?

Posted: 21 Nov 2008, 11:16
by Marco Rotonda
I've tried to compile FieldTripBuffer but I get some errors.
I've downloaded cygwin as they suggested but it says to me:
CMake Error: The source directory "/" does not appear to contain CMakeLists.txt

I've tried with Borland.

Under Borland (v.6) it gives me the following errors:
[C++ Error] FieldTripBuffer.cpp(4): E2209 Unable to open include file 'PCHIncludes.h'
[C++ Error] FieldTripBuffer.cpp(8): E2209 Unable to open include file 'CoreModuleVCL.h'
[C++ Error] FieldTripBuffer.cpp(16): E2268 Call to undefined function 'CoreModuleVCL'
[C++ Error] FieldTripBuffer.cpp(16): E2294 Structure required on left side of . or .*

I'm sorry but I'm not a developper... Any suggestion?

Posted: 21 Nov 2008, 12:07
by mellinger
Marco,

it appears that you don't have a full copy of the BCI2000 source code. Make sure that the BCI2000/src/shared directory is present.
Once this is the case, the FieldTripBuffer filter should compile under the Borland compiler.

Also, there is a pre-built version of the FieldTripBuffer filter present in BCI2000's extended binary distribution at
http://bci2000.org/downloads/bin/BCI2000Contrib.exe

HTH,
Juergen

Posted: 24 Nov 2008, 07:00
by Marco Rotonda
Thanks Mellinger for your reply,
I've taken the .exe already compiled as you suggested me but when I've tried to lunch both the FieldTrip to manage the buffer in realtime AND the MatlabSignalProcessing to have the ability to add some other filters I can launch only once at time.
Is it possible to use both?
I've seen that inside the FieldTripBuffer folder there is another PipeDefinition.cpp file, this file will override the BCI2000 pipeline?
The point is that I wish to use some wavelet analysis on the FieldTripBuffer (in the FildTrip project they give the possibility to do this).

Posted: 24 Nov 2008, 07:01
by Marco Rotonda
Thanks Juergen for your reply,
I've taken the .exe already compiled as you suggested me but when I've tried to lunch both the FieldTrip to manage the buffer in realtime AND the MatlabSignalProcessing to have the ability to add some other filters I can launch only once at time.
Is it possible to use both?
I've seen that inside the FieldTripBuffer folder there is another PipeDefinition.cpp file, this file will override the BCI2000 pipeline?
The point is that I wish to use some wavelet analysis on the FieldTripBuffer (in the FildTrip project they give the possibility to do this).

FieldtripBuffer ...

Posted: 24 Nov 2008, 07:12
by gschalk
Marco,

You can only use one of each of the four modules (Source, Signal Processing, User Application, and Operator) at a time. Thus, you cannot use both modules at the same time, although it should be possible to add the Fieldtrip filter to the PipeDefinition of the MatlabFilter project, so that both filters are called within the same module.

The MatlabFilter and the FieldtripFilter both support operation of Matlab. They differ in that the MatlabFilter provides synchronous Matlab processing, i.e., Matlab functions are called with every processing cycle, and it is also very well integrated in BCI2000 (so that parameters requested in Matlab show up at the BCI2000 GUI), whereas the FieldtripFilter provides asynchronous Matlab processing.

I hope this helps.

Gerv

Posted: 24 Nov 2008, 10:44
by Marco Rotonda
Just to understand, you said that FieldtripBuffer use Matlab too.
Ok... but, as is written in the introduction of the FieldTrip RT buffer (http://fcdonders.ruhosting.nl/fieldtrip ... ime:buffer) FiedTripBuffer is an application that need other applications to read and write the data to the buffer... and Matlab could do this...
If I run FieldTripBuffer how can access that buffer from Matlab within BCI2000?
If I run FieldTripBuffer inside the MatlabFilter (in this way I could access quite easly from the consolle and put the m files in the matab folder) it will run in sync mode but, in such a way, I will lose the async mode that is the real meaning of FieldTrip, isn't it? or I still have the ability to access the buffer async?

Posted: 26 Nov 2008, 05:22
by r.oostenveld
Dear Marco

The signal processing module (i.e. the exe) consists of a pipeline of multiple "filters". The fieldtripbuffer can be one of them, just like the matlab filter, the AR filter and what have you.

A difference between most filters and the FTbuffer is that the fieldtripbuffer will not block the signal processing. I.e. data is written to teh buffer, and if available, a result is read back. If no result is present, it will just continue, assuming that the previous result still applies.

This allows you to insert the FTbuffer transparently anywhere in the pipeline. I have been using the FTbuffer and the matlabfilter together in the same signal processing module. That can help in debugging the processing that is done in the pipeline.

I suggest that we schedule a skype call to explain it in more detail and to discuss how the documentation should be clarified.

PS I hope that you have managed to compile BCI2000 from scratch by now