Programming Reference:VisualizationDemo Signal Processing

From BCI2000 Wiki
Revision as of 15:31, 22 January 2019 by Mellinger (talk | contribs)
Jump to: navigation, search




The VisualizationDemo signal processing module demonstrates how to send visualizations with arbitrary pixel content to the operator module. Two rendering methods are provided: Native Qt QPainter-based rendering, and BCI2000's own GraphDisplay based rendering.


The VisualizationDemoFilter signal processing filter derives from GenericFilter.


The VisualizationDemoFilter computes the determination coefficient (squared correlation, r^2 values) between its first and second input channel. The determination coefficient is visualized in form of a pie chart, and the pie chart is sent to the operator module as bitmap visualization data.


A BitmapVisualization object is used to send visualization window configuration, and bitmap data to the operator module. In the filter's Initialize() method, the bitmap visualization object's SendReferenceFrame() method is called to set an anchor for further visualization data. In the filter's Process() method, rendered visualization data is sent to the operator module using the bitmap visualization object's SendDifferenceFrame method as an update to existing image data.



Native image width in pixels.


Native image height in pixels.


The images' background color, in hexadecimal notation.


A positive integer that indicates how often images are refreshed. 1 means every refresh on every signal packet.

See also

Programming Reference:GraphDisplay Class, Programming Reference:GenericVisualization Class, Programming Reference:ComplexVisualizationDemo Signal Processing