Filter output visualization

Forum for software developers to discuss BCI2000 software development
Locked
alenhardt
Posts: 11
Joined: 29 Nov 2007, 09:31

Filter output visualization

Post by alenhardt » 19 May 2009, 08:27

Hello everyone!


I have written a custom bci2000 module that acts similarly as the signalgenerator. Instead of generating random data, it outputs pre-recorded eeg data from a file. So far the module works as intended, the only problem is that if i check the visualize option for this module (and for the matlab filter which is a simple IIR bandpass) i dont get the option "more/fewer samples" when i right-click the visualization window.
Do i need to implement anything for the options to appear?
Also, how can i adjust the maximum/minimum number ranges in the visualization? The reduce/enlarge only seem to act on specific ranges and at some point you cant increase or decrease the zoom.

Thanks in advance
Alex

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

Post by mellinger » 20 May 2009, 03:35

Alex,

in recent versions of BCI2000, you should always get the "more/fewer samples" option. If it is missing, check the operator module's build date under Help->About.

The reduce/enlarge commands are intentionally range restricted to avoid user confusion. To give BCI2000 a hint regarding the proper range, set the filter output's signal properties from the filter's Preflight() function. As an example, the following code will set the output to unit range:

Code: Select all

void MyFilter::Preflight( const SignalProperties& Input, SignalProperties& Output ) const
{
  ...
  Output.ValueUnit()
    .SetOffset(0)
    .SetGain(1)
    .SetRawMin(-1)
    .SetRawMax(1);
  ...
}
For the Matlab filter, there is currently no way to specify an output range.
Rather, the output range is always assumed to be between +1 und -1.

Regards,
Juergen

Locked

Who is online

Users browsing this forum: No registered users and 0 guests