How to setup FieldTripBuffer?

This forum deals with BCI2000 configuration issues.
Locked
Marco Rotonda
Posts: 15
Joined: 19 Nov 2008, 09:20

How to setup FieldTripBuffer?

Post by Marco Rotonda » 21 Nov 2008, 11:16

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?

mellinger
Posts: 1341
Joined: 12 Feb 2003, 11:06

Post by mellinger » 21 Nov 2008, 12:07

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

Marco Rotonda
Posts: 15
Joined: 19 Nov 2008, 09:20

Post by Marco Rotonda » 24 Nov 2008, 07:00

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).

Marco Rotonda
Posts: 15
Joined: 19 Nov 2008, 09:20

Post by Marco Rotonda » 24 Nov 2008, 07:01

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).

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

FieldtripBuffer ...

Post by gschalk » 24 Nov 2008, 07:12

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

Marco Rotonda
Posts: 15
Joined: 19 Nov 2008, 09:20

Post by Marco Rotonda » 24 Nov 2008, 10:44

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?

r.oostenveld
Posts: 10
Joined: 20 Aug 2007, 08:59

Post by r.oostenveld » 26 Nov 2008, 05:22

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

Locked

Who is online

Users browsing this forum: No registered users and 0 guests