init
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* \page BoxAlgorithm_CSVFileReader CSV File Reader
|
||||
__________________________________________________________________
|
||||
|
||||
Detailed description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileReader_Description|
|
||||
This box reads a Comma Separated Values (CSV) text file. The file must be written using a specific
|
||||
OpenViBE convention. The format is described in detail in \ref Doc_BoxAlgorithm_CSVFileWriter
|
||||
|
||||
The file can contain two streams, one for matrix-type data and one for stimulations.
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileReader_Description|
|
||||
__________________________________________________________________
|
||||
|
||||
Outputs description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileReader_Outputs|
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileReader_Outputs|
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileReader_Output1|
|
||||
This output can carry Signal, Streamed Matrix, Covariance, Spectrum and Feature Vector data.
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileReader_Output1|
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileReader_Output2|
|
||||
This output will contain stimulations read from the file.
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileReader_Output2|
|
||||
__________________________________________________________________
|
||||
|
||||
Settings description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileReader_Settings|
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileReader_Settings|
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileReader_Setting1|
|
||||
Path of the CSV file to read.
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileReader_Setting1|
|
||||
__________________________________________________________________
|
||||
|
||||
Examples description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileReader_Examples|
|
||||
|
||||
Example of a scenario using the CSV Reader box to read a signal file and display it using an Oscilloscope.
|
||||
|
||||
\image html csv-file-reader-example.png "Reading a CSV file"
|
||||
\image latex csv-file-reader-example.png "Reading a CSV file" width=8cm
|
||||
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileReader_Examples|
|
||||
__________________________________________________________________
|
||||
|
||||
Miscellaneous description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileReader_Miscellaneous|
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileReader_Miscellaneous|
|
||||
*/
|
||||
@@ -0,0 +1,151 @@
|
||||
/**
|
||||
* \page BoxAlgorithm_CSVFileWriter CSV File Writer
|
||||
__________________________________________________________________
|
||||
|
||||
Detailed description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileWriter_Description|
|
||||
This box writes incoming time series along with a stimulation stream into a text file using the
|
||||
Comma Separated Values format conforming to the RFC 4180 format.
|
||||
|
||||
The header of the CSV file contains some additional information that enables additional features
|
||||
during subsequent reading. This format is described in the \ref Doc_BoxAlgorithm_CSVFileWriter_Miscellaneous
|
||||
section.
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileWriter_Description|
|
||||
__________________________________________________________________
|
||||
|
||||
Inputs description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileWriter_Inputs|
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileWriter_Inputs|
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileWriter_Input1|
|
||||
Time series input, this can be either a Signal, Streamed Matrix, Spectrum, Covariance Matrix or Feature Vector stream.
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileWriter_Input1|
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileWriter_Input2|
|
||||
Stimulations to be written alongside the signal.
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileWriter_Input2|
|
||||
__________________________________________________________________
|
||||
|
||||
Settings description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileWriter_Settings|
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileWriter_Settings|
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileWriter_Setting1|
|
||||
Path of the CSV file to be written.
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileWriter_Setting1|
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileWriter_Setting2|
|
||||
Precision, in number of decimal digits, of the resulting data. For longer data the precision can significantly impact the file size.
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileWriter_Setting2|
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileWriter_Setting3|
|
||||
By default this box will overwrite data in the file if it exists. If this setting is set to true, the box will append data to the file instead. If the file is empty a header will be added as well. It is up to the user to ensure herself that the data written is of the same type and dimensions.
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileWriter_Setting3|
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileWriter_Setting4|
|
||||
If this setting is activated, only the last received matrix will be written to the file. This can be used, for example, with cumulative average box.
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileWriter_Setting4|
|
||||
__________________________________________________________________
|
||||
|
||||
Examples description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileWriter_Examples|
|
||||
|
||||
Example of writing a spectrum into a CSV file:
|
||||
|
||||
\image html csv-file-writer-example.png "Writing a CSV file"
|
||||
\image latex csv-file-writer-example.png "Writing a CSV file" width=8cm
|
||||
|
||||
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileWriter_Examples|
|
||||
__________________________________________________________________
|
||||
|
||||
Miscellaneous description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_CSVFileWriter_Miscellaneous|
|
||||
|
||||
The CSV Format
|
||||
|
||||
## Example file containing Signal data and Stimulations
|
||||
|
||||
Signal file sampled at 8Hz, with epochs of 0.5s length. Note that the timestamps do not have an end time which is implicit.
|
||||
|
||||
In this example each x represents an arbitrary floating point value. The header contains the following rows:
|
||||
|
||||
- Time:8Hz - contains the timestamp of each sample, this label also encodes the original sampling rate
|
||||
- Epoch - contains the number of the epoch in which each sample is contained, this allows encoding even overlapping signal
|
||||
- O1, O2, Pz, P3, P4 - channels containing EEG data
|
||||
- Event Id - contains a colon separated list of StimulationIds
|
||||
- Event Date - contains the same number of timestamps
|
||||
- Event Duration - is constructed in the same manner as Event Date
|
||||
|
||||
\code{.unparsed}
|
||||
Time:8Hz,Epoch,O1,O2,Pz,P3,P4,Event Id,Event Date,Event Duration
|
||||
0.00000,0,x,x,x,x,x,,,
|
||||
0.12500,0,x,x,x,x,x,,,
|
||||
0.25000,0,x,x,x,x,x,32000:32010,0.25000:0.25000,0:0
|
||||
0.37500,0,x,x,x,x,x,,,
|
||||
0.50000,1,x,x,x,x,x,,,
|
||||
0.62500,1,x,x,x,x,x,,,
|
||||
0.75000,1,x,x,x,x,x,35000,0.75250,0
|
||||
0.87500,1,x,x,x,x,x,,,
|
||||
\endcode
|
||||
|
||||
## Example file containing a three dimensional matrix
|
||||
|
||||
This example file contains 2x2x2 matrices produced every 0.125 seconds and spanning one second.
|
||||
|
||||
The labels for this matrix are:
|
||||
|
||||
- for first dimension "LA", "LB"
|
||||
- for second dimension "1", "2"
|
||||
- for third dimension "X", "Y"
|
||||
|
||||
\code{.unparsed}
|
||||
Time:2x2x2,End Time,LA:1:X,LA:1:Y,LA:2:X,LA:2:Y,LB:1:X,...,LB:2:Y,Event Id,Event Date,Event Duration
|
||||
0.00000,1.00000,x,x,x,x,x,...,x,,,
|
||||
0.12500,1.12500,x,x,x,x,x,...,x,,,
|
||||
0.25000,1.25000,x,x,x,x,x,...,x,,,
|
||||
0.37500,1.37500,x,x,x,x,x,...,x,,,
|
||||
0.50000,1.50000,x,x,x,x,x,...,x,,,
|
||||
0.62500,1.62500,x,x,x,x,x,...,x,,,
|
||||
0.75000,1.75000,x,x,x,x,x,...,x,,,
|
||||
0.87500,1.62500,x,x,x,x,x,...,x,,,
|
||||
1.00000,2.00000,x,x,x,x,x,...,x,,,
|
||||
1.12500,2.12500,x,x,x,x,x,...,x,,,
|
||||
\endcode
|
||||
|
||||
\note
|
||||
A label can be an empty string. If second dimension had an empty label then the first column would have label "LA::X", if it were the third dimension the column would have label "LA:1:"
|
||||
|
||||
|
||||
## Example file containing a spectrum
|
||||
|
||||
Spectrum file with 2 channels, 128Hz signal and spectra calculated on periods of 1 second every 0.125 seconds. The last element in the Time column (128) represents the original sampling rate.
|
||||
|
||||
\code{.unparsed}
|
||||
Time:2x64:128,End Time,O1:0,O1:1.015873,...,O1:64,O2:0,...,O2:64,Event Id,Event Date,Event Duration
|
||||
0.00000,1.00000,x,x,...,x,x,...,x,,,
|
||||
0.12500,1.12500,x,x,...,x,x,...,x,,,
|
||||
0.25000,1.25000,x,x,...,x,x,...,x,,,
|
||||
0.37500,1.37500,x,x,...,x,x,...,x,,,
|
||||
0.50000,1.50000,x,x,...,x,x,...,x,,,
|
||||
0.62500,1.62500,x,x,...,x,x,...,x,,,
|
||||
0.75000,1.75000,x,x,...,x,x,...,x,,,
|
||||
0.87500,1.87500,x,x,...,x,x,...,x,,,
|
||||
1.00000,2.00000,x,x,...,x,x,...,x,,,
|
||||
1.12500,2.12500,x,x,...,x,x,...,x,,,
|
||||
\endcode
|
||||
|
||||
|
||||
|
||||
* |OVP_DocEnd_BoxAlgorithm_CSVFileWriter_Miscellaneous|
|
||||
*/
|
||||
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* \page BoxAlgorithm_ElectrodeLocalisationFileReader Electrode localisation file reader
|
||||
__________________________________________________________________
|
||||
|
||||
Detailed description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_ElectrodeLocalisationFileReader_Description|
|
||||
* This box loads files holding the normalized coordinates of an electrode set.
|
||||
* |OVP_DocEnd_BoxAlgorithm_ElectrodeLocalisationFileReader_Description|
|
||||
__________________________________________________________________
|
||||
|
||||
Outputs description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_ElectrodeLocalisationFileReader_Outputs|
|
||||
* |OVP_DocEnd_BoxAlgorithm_ElectrodeLocalisationFileReader_Outputs|
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_ElectrodeLocalisationFileReader_Output1|
|
||||
* The output channel localization information.
|
||||
* |OVP_DocEnd_BoxAlgorithm_ElectrodeLocalisationFileReader_Output1|
|
||||
__________________________________________________________________
|
||||
|
||||
Settings description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_ElectrodeLocalisationFileReader_Settings|
|
||||
* |OVP_DocEnd_BoxAlgorithm_ElectrodeLocalisationFileReader_Settings|
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_ElectrodeLocalisationFileReader_Setting1|
|
||||
* The normalized coordinates file.
|
||||
* |OVP_DocEnd_BoxAlgorithm_ElectrodeLocalisationFileReader_Setting1|
|
||||
__________________________________________________________________
|
||||
|
||||
Examples description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_ElectrodeLocalisationFileReader_Examples|
|
||||
* A default electrode set should be included in your BRAND_NAME distribution. Look for
|
||||
* it in the <tt>share/electrode_sets</tt> directory of the source tree of this plugin.
|
||||
* It comes as a \ref Doc_MatrixFileFormat "text file" which is quite self explanatory,
|
||||
* open it in a text editor to edit it. Electrode names are specified in the header
|
||||
* section of the matrix, while actual coordinates are stored in the buffer section.
|
||||
* |OVP_DocEnd_BoxAlgorithm_ElectrodeLocalisationFileReader_Examples|
|
||||
__________________________________________________________________
|
||||
|
||||
Miscellaneous description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_ElectrodeLocalisationFileReader_Miscellaneous|
|
||||
* The coordinates loaded by this box are sent once only (static coordinates, e.g. EEG), as
|
||||
* opposed to regularly (dynamic coordinates, e.g. MEG).
|
||||
* The supported file format is the \ref Doc_MatrixFileFormat "BRAND_NAME matrix" file format.
|
||||
* Electrode coordinates must be normalized cartesian coordinates in the following frame
|
||||
* of reference : X right, Y front and Z up.
|
||||
* |OVP_DocEnd_BoxAlgorithm_ElectrodeLocalisationFileReader_Miscellaneous|
|
||||
*/
|
||||
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* \page BoxAlgorithm_GenericStreamReader Generic stream reader
|
||||
__________________________________________________________________
|
||||
|
||||
Detailed description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_GenericStreamReader_Description|
|
||||
This box is able to read any file saved with the \ref Doc_BoxAlgorithm_GenericStreamWriter box.
|
||||
It is interesting to notice that such file can contain a variable number of streams. Therefore,
|
||||
the user is able to add and modify any output he wants on the box. The box does not supposes
|
||||
anything on the streams contained in the file during authoring in the designer. The streams of
|
||||
the file are mapped to created output at runtime in an "intelligent way" depending on there types.
|
||||
* |OVP_DocEnd_BoxAlgorithm_GenericStreamReader_Description|
|
||||
__________________________________________________________________
|
||||
|
||||
Outputs description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_GenericStreamReader_Outputs|
|
||||
This box can have as many output you want depending on the content of the file.
|
||||
* |OVP_DocEnd_BoxAlgorithm_GenericStreamReader_Outputs|
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_GenericStreamReader_Output1|
|
||||
This is the default output.
|
||||
* |OVP_DocEnd_BoxAlgorithm_GenericStreamReader_Output1|
|
||||
__________________________________________________________________
|
||||
|
||||
Settings description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_GenericStreamReader_Settings|
|
||||
* |OVP_DocEnd_BoxAlgorithm_GenericStreamReader_Settings|
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_GenericStreamReader_Setting1|
|
||||
This setting points to the file to read. This file may contain a variable number of multiplexed
|
||||
streams. Those streams will be mapped to corresponding outputs at runtime. The mapping is done in
|
||||
an "intelligent way" because it reorders the streams contained in the file to match the types of
|
||||
the outputs. If a stream from the file does not find a matching output, a warning is launched.
|
||||
If an output does not find a matching stream from the file, a warning is also launched.
|
||||
* |OVP_DocEnd_BoxAlgorithm_GenericStreamReader_Setting1|
|
||||
__________________________________________________________________
|
||||
|
||||
Examples description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_GenericStreamReader_Examples|
|
||||
* |OVP_DocEnd_BoxAlgorithm_GenericStreamReader_Examples|
|
||||
__________________________________________________________________
|
||||
|
||||
Miscellaneous description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_GenericStreamReader_Miscellaneous|
|
||||
* |OVP_DocEnd_BoxAlgorithm_GenericStreamReader_Miscellaneous|
|
||||
*/
|
||||
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* \page BoxAlgorithm_GenericStreamWriter Generic stream writer
|
||||
__________________________________________________________________
|
||||
|
||||
Detailed description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_GenericStreamWriter_Description|
|
||||
This box is able to dump any OpenViBE stream into a binary file. In the cacse where this box
|
||||
would have multiple inputs, the streams would be multiplexed in the file. Such file can
|
||||
be read back with the \ref Doc_BoxAlgorithm_GenericStreamReader
|
||||
* |OVP_DocEnd_BoxAlgorithm_GenericStreamWriter_Description|
|
||||
__________________________________________________________________
|
||||
|
||||
Inputs description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_GenericStreamWriter_Inputs|
|
||||
You can add any input you want to this box depending on the number of streams you want to dump.
|
||||
In the cacse where this box would have multiple inputs, the streams would be multiplexed in the file.
|
||||
* |OVP_DocEnd_BoxAlgorithm_GenericStreamWriter_Inputs|
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_GenericStreamWriter_Input1|
|
||||
The default input.
|
||||
|
||||
<b>Note: it important to correctly configure the type of the inputs</b>. That information will be
|
||||
used by the \ref Doc_BoxAlgorithm_GenericStreamReader to map the contained streams to its outputs.
|
||||
* |OVP_DocEnd_BoxAlgorithm_GenericStreamWriter_Input1|
|
||||
__________________________________________________________________
|
||||
|
||||
Settings description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_GenericStreamWriter_Settings|
|
||||
* |OVP_DocEnd_BoxAlgorithm_GenericStreamWriter_Settings|
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_GenericStreamWriter_Setting1|
|
||||
This setting points to the file to write the streams to.
|
||||
* |OVP_DocEnd_BoxAlgorithm_GenericStreamWriter_Setting1|
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_GenericStreamWriter_Setting2|
|
||||
Thanks to this setting, you can use compression on each input stream. This means that the basic
|
||||
structure of the file remains uncompressed but that each stream inside this structure is compressed.
|
||||
<b>Note: this is not implemented at the moment</b>.
|
||||
* |OVP_DocEnd_BoxAlgorithm_GenericStreamWriter_Setting2|
|
||||
__________________________________________________________________
|
||||
|
||||
Examples description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_GenericStreamWriter_Examples|
|
||||
* |OVP_DocEnd_BoxAlgorithm_GenericStreamWriter_Examples|
|
||||
__________________________________________________________________
|
||||
|
||||
Miscellaneous description
|
||||
__________________________________________________________________
|
||||
|
||||
* |OVP_DocBegin_BoxAlgorithm_GenericStreamWriter_Miscellaneous|
|
||||
* |OVP_DocEnd_BoxAlgorithm_GenericStreamWriter_Miscellaneous|
|
||||
*/
|
||||
@@ -0,0 +1,66 @@
|
||||
.. _Doc_BoxAlgorithm_CSVFileReader:
|
||||
|
||||
CSV File Reader
|
||||
===============
|
||||
|
||||
.. container:: attribution
|
||||
|
||||
:Author:
|
||||
Victor Herlin
|
||||
:Company:
|
||||
Mensia Technologies SA
|
||||
|
||||
.. image:: images/Doc_BoxAlgorithm_CSVFileReader.png
|
||||
|
||||
This box reads a Comma Separated Values (CSV) text file. The file must be written using a specific
|
||||
OpenViBE convention. The format is described in detail in :ref:`Doc_BoxAlgorithm_CSVFileWriter`
|
||||
|
||||
The file can contain two streams, one for matrix-type data and one for stimulations.
|
||||
|
||||
Outputs
|
||||
-------
|
||||
|
||||
.. csv-table::
|
||||
:header: "Output Name", "Stream Type"
|
||||
|
||||
"Output stream", "Signal"
|
||||
"Output stimulation", "Stimulations"
|
||||
|
||||
Output stream
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
This output can carry Signal, Streamed Matrix, Covariance, Spectrum and Feature Vector data.
|
||||
|
||||
Output stimulation
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This output will contain stimulations read from the file.
|
||||
|
||||
.. _Doc_BoxAlgorithm_CSVFileReader_Settings:
|
||||
|
||||
Settings
|
||||
--------
|
||||
|
||||
.. csv-table::
|
||||
:header: "Setting Name", "Type", "Default Value"
|
||||
|
||||
"Filename", "Filename", ""
|
||||
|
||||
Filename
|
||||
~~~~~~~~
|
||||
|
||||
Path of the CSV file to read.
|
||||
|
||||
.. _Doc_BoxAlgorithm_CSVFileReader_Examples:
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Example of a scenario using the CSV Reader box to read a signal file and display it using an Oscilloscope.
|
||||
|
||||
.. figure:: images/csv-file-reader-example.png
|
||||
:alt: Reading a CSV file
|
||||
:align: center
|
||||
|
||||
Reading a CSV file
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
.. _Doc_BoxAlgorithm_CSVFileWriter:
|
||||
|
||||
CSV File Writer
|
||||
===============
|
||||
|
||||
.. container:: attribution
|
||||
|
||||
:Author:
|
||||
Victor Herlin
|
||||
:Company:
|
||||
Mensia Technologies SA
|
||||
|
||||
|
||||
.. image:: images/Doc_BoxAlgorithm_CSVFileWriter.png
|
||||
|
||||
This box writes incoming time series along with a stimulation stream into a text file using the
|
||||
Comma Separated Values format conforming to the RFC 4180 format.
|
||||
|
||||
The header of the CSV file contains some additional information that enables additional features
|
||||
during subsequent reading. This format is described in the :ref:`Doc_BoxAlgorithm_CSVFileWriter_Miscellaneous`
|
||||
section.
|
||||
|
||||
Inputs
|
||||
------
|
||||
|
||||
.. csv-table::
|
||||
:header: "Input Name", "Stream Type"
|
||||
|
||||
"Input stream", "Signal"
|
||||
"Stimulations stream", "Stimulations"
|
||||
|
||||
Input stream
|
||||
~~~~~~~~~~~~
|
||||
|
||||
Time series input, this can be either a Signal, Streamed Matrix, Spectrum, Covariance Matrix or Feature Vector stream.
|
||||
|
||||
Stimulations stream
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Stimulations to be written alongside the signal.
|
||||
|
||||
.. _Doc_BoxAlgorithm_CSVFileWriter_Settings:
|
||||
|
||||
Settings
|
||||
--------
|
||||
|
||||
.. csv-table::
|
||||
:header: "Setting Name", "Type", "Default Value"
|
||||
|
||||
"Filename", "Filename", ""
|
||||
"Precision", "Integer", "10"
|
||||
"Append data", "Boolean", "false"
|
||||
"Only last matrix", "Boolean", "false"
|
||||
|
||||
Filename
|
||||
~~~~~~~~
|
||||
|
||||
Path of the CSV file to be written.
|
||||
|
||||
|
||||
- Default value : [ *record-[$core{date}-$core{time}].csv* ]
|
||||
|
||||
|
||||
Precision
|
||||
~~~~~~~~~
|
||||
|
||||
Precision, in number of decimal digits, of the resulting data. For longer data the precision can significantly impact the file size.
|
||||
|
||||
Append data
|
||||
~~~~~~~~~~~
|
||||
|
||||
By default this box will overwrite data in the file if it exists. If this setting is set to true, the box will append data to the file instead. If the file is empty a header will be added as well. It is up to the user to ensure herself that the data written is of the same type and dimensions.
|
||||
|
||||
Only last matrix
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
If this setting is activated, only the last received matrix will be written to the file. This can be used, for example, with cumulative average box.
|
||||
|
||||
.. _Doc_BoxAlgorithm_CSVFileWriter_Examples:
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Example of writing a spectrum into a CSV file:
|
||||
|
||||
.. figure:: images/csv-file-writer-example.png
|
||||
:alt: Writing a CSV file
|
||||
:align: center
|
||||
|
||||
Writing a CSV file
|
||||
|
||||
.. _Doc_BoxAlgorithm_CSVFileWriter_Miscellaneous:
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
The CSV Format
|
||||
|
||||
## Example file containing Signal data and Stimulations
|
||||
|
||||
Signal file sampled at 8Hz, with epochs of 0.5s length. Note that the timestamps do not have an end time which is implicit.
|
||||
|
||||
In this example each x represents an arbitrary floating point value. The header contains the following rows:
|
||||
|
||||
|
||||
- Time:8Hz - contains the timestamp of each sample, this label also encodes the original sampling rate
|
||||
- Epoch - contains the number of the epoch in which each sample is contained, this allows encoding even overlapping signal
|
||||
- O1, O2, Pz, P3, P4 - channels containing EEG data
|
||||
- Event Id - contains a colon separated list of StimulationIds
|
||||
- Event Date - contains the same number of timestamps
|
||||
- Event Duration - is constructed in the same manner as Event Date
|
||||
|
||||
|
||||
|
||||
.. code::
|
||||
|
||||
Time:8Hz,Epoch,O1,O2,Pz,P3,P4,Event Id,Event Date,Event Duration
|
||||
0.00000,0,x,x,x,x,x,,,
|
||||
0.12500,0,x,x,x,x,x,,,
|
||||
0.25000,0,x,x,x,x,x,32000:32010,0.25000:0.25000,0:0
|
||||
0.37500,0,x,x,x,x,x,,,
|
||||
0.50000,1,x,x,x,x,x,,,
|
||||
0.62500,1,x,x,x,x,x,,,
|
||||
0.75000,1,x,x,x,x,x,35000,0.75250,0
|
||||
0.87500,1,x,x,x,x,x,,,
|
||||
|
||||
## Example file containing a three dimensional matrix
|
||||
|
||||
This example file contains 2x2x2 matrices produced every 0.125 seconds and spanning one second.
|
||||
|
||||
The labels for this matrix are:
|
||||
|
||||
|
||||
- for first dimension "LA", "LB"
|
||||
- for second dimension "1", "2"
|
||||
- for third dimension "X", "Y"
|
||||
|
||||
|
||||
|
||||
.. code::
|
||||
|
||||
Time:2x2x2,End Time,LA:1:X,LA:1:Y,LA:2:X,LA:2:Y,LB:1:X,...,LB:2:Y,Event Id,Event Date,Event Duration
|
||||
0.00000,1.00000,x,x,x,x,x,...,x,,,
|
||||
0.12500,1.12500,x,x,x,x,x,...,x,,,
|
||||
0.25000,1.25000,x,x,x,x,x,...,x,,,
|
||||
0.37500,1.37500,x,x,x,x,x,...,x,,,
|
||||
0.50000,1.50000,x,x,x,x,x,...,x,,,
|
||||
0.62500,1.62500,x,x,x,x,x,...,x,,,
|
||||
0.75000,1.75000,x,x,x,x,x,...,x,,,
|
||||
0.87500,1.62500,x,x,x,x,x,...,x,,,
|
||||
1.00000,2.00000,x,x,x,x,x,...,x,,,
|
||||
1.12500,2.12500,x,x,x,x,x,...,x,,,
|
||||
|
||||
\note
|
||||
A label can be an empty string. If second dimension had an empty label then the first column would have label "LA::X", if it were the third dimension the column would have label "LA:1:"
|
||||
|
||||
## Example file containing a spectrum
|
||||
|
||||
Spectrum file with 2 channels, 128Hz signal and spectra calculated on periods of 1 second every 0.125 seconds. The last element in the Time column (128) represents the original sampling rate.
|
||||
|
||||
|
||||
.. code::
|
||||
|
||||
Time:2x64:128,End Time,O1:0,O1:1.015873,...,O1:64,O2:0,...,O2:64,Event Id,Event Date,Event Duration
|
||||
0.00000,1.00000,x,x,...,x,x,...,x,,,
|
||||
0.12500,1.12500,x,x,...,x,x,...,x,,,
|
||||
0.25000,1.25000,x,x,...,x,x,...,x,,,
|
||||
0.37500,1.37500,x,x,...,x,x,...,x,,,
|
||||
0.50000,1.50000,x,x,...,x,x,...,x,,,
|
||||
0.62500,1.62500,x,x,...,x,x,...,x,,,
|
||||
0.75000,1.75000,x,x,...,x,x,...,x,,,
|
||||
0.87500,1.87500,x,x,...,x,x,...,x,,,
|
||||
1.00000,2.00000,x,x,...,x,x,...,x,,,
|
||||
1.12500,2.12500,x,x,...,x,x,...,x,,,
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
.. _Doc_BoxAlgorithm_ElectrodeLocalisationFileReader:
|
||||
|
||||
Electrode localisation file reader
|
||||
==================================
|
||||
|
||||
.. container:: attribution
|
||||
|
||||
:Author:
|
||||
Vincent Delannoy
|
||||
:Company:
|
||||
INRIA/IRISA
|
||||
|
||||
.. image:: images/Doc_BoxAlgorithm_ElectrodeLocalisationFileReader.png
|
||||
|
||||
This box loads files holding the normalized coordinates of an electrode set.
|
||||
|
||||
Outputs
|
||||
-------
|
||||
|
||||
.. csv-table::
|
||||
:header: "Output Name", "Stream Type"
|
||||
|
||||
"Channel localisation", "Channel localisation"
|
||||
|
||||
Channel localisation
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The output channel localization information.
|
||||
|
||||
.. _Doc_BoxAlgorithm_ElectrodeLocalisationFileReader_Settings:
|
||||
|
||||
Settings
|
||||
--------
|
||||
|
||||
.. csv-table::
|
||||
:header: "Setting Name", "Type", "Default Value"
|
||||
|
||||
"Filename", "Filename", ""
|
||||
|
||||
Filename
|
||||
~~~~~~~~
|
||||
|
||||
The normalized coordinates file.
|
||||
|
||||
.. _Doc_BoxAlgorithm_ElectrodeLocalisationFileReader_Examples:
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
A default electrode set should be included in your NeuroRT distribution. Look for
|
||||
it in the ``share/electrode_sets`` directory of the source tree of this plugin.
|
||||
It comes as a :ref:`Doc_MatrixFileFormat` "text file" which is quite self explanatory,
|
||||
open it in a text editor to edit it. Electrode names are specified in the header
|
||||
section of the matrix, while actual coordinates are stored in the buffer section.
|
||||
|
||||
.. _Doc_BoxAlgorithm_ElectrodeLocalisationFileReader_Miscellaneous:
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
The coordinates loaded by this box are sent once only (static coordinates, e.g. EEG), as
|
||||
opposed to regularly (dynamic coordinates, e.g. MEG).
|
||||
The supported file format is the :ref:`Doc_MatrixFileFormat` "NeuroRT matrix" file format.
|
||||
Electrode coordinates must be normalized cartesian coordinates in the following frame
|
||||
of reference : X right, Y front and Z up.
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
.. _Doc_BoxAlgorithm_GenericStreamReader:
|
||||
|
||||
Generic stream reader
|
||||
=====================
|
||||
|
||||
.. container:: attribution
|
||||
|
||||
:Author:
|
||||
Yann Renard
|
||||
:Company:
|
||||
INRIA
|
||||
|
||||
.. image:: images/Doc_BoxAlgorithm_GenericStreamReader.png
|
||||
|
||||
Generic Stream Writer box can be used to store data in the format read by this box
|
||||
|
||||
This box is able to read any file saved with the :ref:`Doc_BoxAlgorithm_GenericStreamWriter` box.
|
||||
It is interesting to notice that such file can contain a variable number of streams. Therefore,
|
||||
the user is able to add and modify any output he wants on the box. The box does not supposes
|
||||
anything on the streams contained in the file during authoring in the designer. The streams of
|
||||
the file are mapped to created output at runtime in an "intelligent way" depending on there types.
|
||||
|
||||
Outputs
|
||||
-------
|
||||
|
||||
.. csv-table::
|
||||
:header: "Output Name", "Stream Type"
|
||||
|
||||
"Output Signal", "Signal"
|
||||
"Output Stimulations", "Stimulations"
|
||||
|
||||
This box can have as many output you want depending on the content of the file.
|
||||
|
||||
Output Signal
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
This is the default output.
|
||||
|
||||
.. _Doc_BoxAlgorithm_GenericStreamReader_Settings:
|
||||
|
||||
Settings
|
||||
--------
|
||||
|
||||
.. csv-table::
|
||||
:header: "Setting Name", "Type", "Default Value"
|
||||
|
||||
"Filename", "Filename", ""
|
||||
|
||||
Filename
|
||||
~~~~~~~~
|
||||
|
||||
This setting points to the file to read. This file may contain a variable number of multiplexed
|
||||
streams. Those streams will be mapped to corresponding outputs at runtime. The mapping is done in
|
||||
an "intelligent way" because it reorders the streams contained in the file to match the types of
|
||||
the outputs. If a stream from the file does not find a matching output, a warning is launched.
|
||||
If an output does not find a matching stream from the file, a warning is also launched.
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
.. _Doc_BoxAlgorithm_GenericStreamWriter:
|
||||
|
||||
Generic stream writer
|
||||
=====================
|
||||
|
||||
.. container:: attribution
|
||||
|
||||
:Author:
|
||||
Yann Renard
|
||||
:Company:
|
||||
INRIA
|
||||
|
||||
.. image:: images/Doc_BoxAlgorithm_GenericStreamWriter.png
|
||||
|
||||
This box is able to dump any OpenViBE stream into a binary file. In the cacse where this box
|
||||
would have multiple inputs, the streams would be multiplexed in the file. Such file can
|
||||
be read back with the :ref:`Doc_BoxAlgorithm_GenericStreamReader`
|
||||
|
||||
Inputs
|
||||
------
|
||||
|
||||
.. csv-table::
|
||||
:header: "Input Name", "Stream Type"
|
||||
|
||||
"Input Signal", "Signal"
|
||||
"Input Stimulations", "Stimulations"
|
||||
|
||||
You can add any input you want to this box depending on the number of streams you want to dump.
|
||||
In the cacse where this box would have multiple inputs, the streams would be multiplexed in the file.
|
||||
|
||||
Input Signal
|
||||
~~~~~~~~~~~~
|
||||
|
||||
The default input.
|
||||
|
||||
**Note: it important to correctly configure the type of the inputs**. That information will be
|
||||
used by the :ref:`Doc_BoxAlgorithm_GenericStreamReader` to map the contained streams to its outputs.
|
||||
|
||||
.. _Doc_BoxAlgorithm_GenericStreamWriter_Settings:
|
||||
|
||||
Settings
|
||||
--------
|
||||
|
||||
.. csv-table::
|
||||
:header: "Setting Name", "Type", "Default Value"
|
||||
|
||||
"Filename", "Filename", ""
|
||||
"Use compression", "Boolean", "false"
|
||||
|
||||
Filename
|
||||
~~~~~~~~
|
||||
|
||||
This setting points to the file to write the streams to.
|
||||
|
||||
|
||||
- Default value : [ *record-[$core{date}-$core{time}].ov* ]
|
||||
|
||||
|
||||
Use compression
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
Thanks to this setting, you can use compression on each input stream. This means that the basic
|
||||
structure of the file remains uncompressed but that each stream inside this structure is compressed.
|
||||
**Note: this is not implemented at the moment**.
|
||||
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 31 KiB |