-
Notifications
You must be signed in to change notification settings - Fork 0
/
ElectrodeTable.hpp
118 lines (100 loc) · 3.07 KB
/
ElectrodeTable.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#pragma once
#include <string>
#include "hdmf/table/DynamicTable.hpp"
#include "hdmf/table/ElementIdentifiers.hpp"
#include "hdmf/table/VectorData.hpp"
#include "io/BaseIO.hpp"
namespace AQNWBIO
{
/**
* @brief Represents a table containing electrode metadata.
*/
class ElectrodeTable : public DynamicTable
{
public:
/**
* @brief Constructor.
* @param path The path of the table.
* @param io The shared pointer to the BaseIO object.
* @param channels The vector of channel numbers.
* @param description The description of the table (default: "metadata about
* extracellular electrodes").
*/
ElectrodeTable(const std::string& path,
std::shared_ptr<BaseIO> io,
const std::vector<int>& channels,
const std::string& description =
"metadata about extracellular electrodes");
/**
* @brief Destructor.
*/
~ElectrodeTable();
/**
* @brief Initializes the ElectrodeTable.
*
* Initializes the ElectrodeTable by creating NWB related attributes and
* adding required columns.
*/
void initialize();
/**
* @brief Sets up the ElectrodeTable by adding electrodes and their metadata.
*
*/
void addElectrodes();
/**
* @brief Gets the column names of the ElectrodeTable.
* @return The vector of column names.
*/
const std::vector<std::string>& getColNames() override;
/**
* @brief Sets the column names of the ElectrodeTable.
* @param newColNames The vector of new column names.
*/
void setColNames(const std::vector<std::string>& newColNames);
/**
* @brief Gets the group path of the ElectrodeTable.
* @return The group path.
*/
std::string getGroupPath() const;
/**
* @brief Sets the group path of the ElectrodeTable.
* @param groupPath The new group path.
*/
void setGroupPath(const std::string& groupPath);
std::unique_ptr<ElementIdentifiers> electrodeDataset =
std::make_unique<ElementIdentifiers>(); /**< The electrode dataset. */
std::unique_ptr<VectorData> groupNamesDataset =
std::make_unique<VectorData>(); /**< The group names dataset. */
std::unique_ptr<VectorData> locationsDataset =
std::make_unique<VectorData>(); /**< The locations dataset. */
private:
/**
* @brief The channel information from the acquisition system.
*/
std::vector<int> channels;
/**
* @brief The global indices for each electrode.
*/
std::vector<int> electrodeNumbers;
/**
* @brief The names of the ElectrodeGroup object for each electrode.
*/
std::vector<std::string> groupNames;
/**
* @brief The location names for each electrode.
*/
std::vector<std::string> locationNames;
/**
* @brief The references to the ElectrodeGroup object for each electrode.
*/
std::vector<std::string> groupReferences;
/**
* @brief The vector of column names for the table.
*/
std::vector<std::string> colNames = {"group", "group_name", "location"};
/**
* @brief The references path to the ElectrodeGroup
*/
std::string groupPath = "/general/extracellular_ephys/array1";
};
} // namespace AQNWBIO