ElectrodeMap

Overview

If a configuration with less than 1024 electrodes is uploaded to the MaxOne or MaxTwo via the API, the system will send data from other electrodes that were not chosen when reading in data with the C++ API. This class was made in order to combat this; it can be used to filter out activity that does not originate from the routed configuration file.

Members

class ElectrodeMap

Public Functions

ElectrodeMap()

Construct a new Electrode Map object.

ElectrodeMap(const char *config_path)

Construct a new Electrode Map object.

Parameters:

config_pathchar array (c string) representing the full path of the config file

bool exists(int channelNo)

Checks if a channel number exists in the config.

Parameters:

channelNoint representing the channel number of the target electrode

Returns:

true if the channel number exists, false otherwise

struct electrodeCoords get(int channelNo)

Gets the positional data of an electrode given its channel number.

Parameters:

channelNoint representing the channel number of the target electrode

Returns:

struct electrodeCoords; if the channelNo was not set (i.e. it wasn’t in the config file), each element of the returned struct will be set to -1.

int getPosition(int channelNo)

Gets the electrode number of an electrode given its channel number.

Parameters:

channelNoint representing the channel number of the target electrode

Returns:

int; if the channelNo was not set (i.e. it wasn’t in the config file), then -1 will be returned.

float getX(int channelNo)

Gets the x coordinate (in µm) of an electrode given its channel number.

Parameters:

channelNoint channel to get the x coordinate of

Returns:

float; if the channelNo was not set (i.e. it wasn’t in the config file), then -1 will be returned.

float getY(int channelNo)

Gets the y coordinate (in µm) of an electrode given its channel number.

Parameters:

channelNoint channel to get the y coordinate of

Returns:

float; if the channelNo was not set (i.e. it wasn’t in the config file), then -1 will be returned.

int size()

Gets the number of mapped channels in the configuration.

Returns:

int

void print()

prints the ElectrodeMap