Programming Reference:ChoiceCombination
Function
The ChoiceCombination class contains filters that are applied alternatively, depending on a user choice. To use a ChoiceCombination, you need to derive a child class and define a constructor in which you add the desired filters, together with corresponding user choices. In addition, you need to specify a parameter name that will be displayed in the BCI2000 GUI, and allows to select one of the choices.
#include "ChoiceCombination.h"
#include "IdentityFilter.h"
#include "Filter1.h"
#include "Filter2.h"
struct MyChoice : ChoiceCombination
{
MyChoice() : ChoiceCombination("MyParameterName")
{
AddChoice<IdentityFilter>(1);
AddChoice<Filter1>(2);
AddChoice<Filter2>(3);
}
};
In the above example, we have used the IdentityFilter to give the user an "neutral" choice, i.e. not processing anything but transferring the input signal to the output unchanged.
Parameters
<UserDefinedParameterName>
An enumeration parameter whose value determines which of the filters is applied to the input.
States
None.
See also
Programming Reference:ParallelCombination, Programming Reference:LinearCombination, Programming Reference:IdentityFilter