aqnwb 0.1.0
Loading...
Searching...
No Matches
ElectrodeTable.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
5#include "io/BaseIO.hpp"
9
10namespace AQNWB::NWB
11{
16{
17public:
18 // Register the ElectrodeTable as a subclass of Container
19 // REGISTER_SUBCLASS(ElectrodeTable, "core")
20 REGISTER_SUBCLASS_WITH_TYPENAME(ElectrodeTable, "core", "DynamicTable")
21
22
27 ElectrodeTable(std::shared_ptr<IO::BaseIO> io);
28
29 // required so we can call create
30 ElectrodeTable(const std::string& path, std::shared_ptr<IO::BaseIO> io);
31
36
45 void initialize(const std::string& description =
46 "metadata about extracellular electrodes");
47
54 void finalize();
55
60 void addElectrodes(std::vector<Channel> channelsInput);
61
66 inline std::string getGroupPath() const
67 {
68 // all channels in ChannelVector should have the same groupName
69 return m_groupReferences[0];
70 }
71
76 void setGroupPath(const std::string& groupPath);
77
81 inline const static std::string electrodeTablePath =
82 "/general/extracellular_ephys/electrodes";
83
84private:
88 std::vector<int> m_electrodeNumbers;
89
93 std::vector<std::string> m_groupNames;
94
98 std::vector<std::string> m_locationNames;
99
103 std::vector<std::string> m_groupReferences;
104
108 inline const static std::string m_groupPathBase =
109 "/general/extracellular_ephys";
110
114 std::unique_ptr<ElementIdentifiers> m_electrodeDataset;
115
119 std::unique_ptr<VectorData> m_groupNamesDataset;
120
124 std::unique_ptr<VectorData> m_locationsDataset;
125};
126} // namespace AQNWB::NWB
#define REGISTER_SUBCLASS_WITH_TYPENAME(T, NAMESPACE, TYPENAME)
Macro to register a subclass with the RegisteredType class registry.
Definition RegisteredType.hpp:289
void initialize()
Initialize the container.
Definition Container.cpp:20
DynamicTable(const std::string &path, std::shared_ptr< IO::BaseIO > io, const std::vector< std::string > &colNames={})
Constructor.
Definition DynamicTable.cpp:12
std::unique_ptr< VectorData > m_locationsDataset
The locations column for write.
Definition ElectrodeTable.hpp:124
ElectrodeTable(std::shared_ptr< IO::BaseIO > io)
Constructor.
Definition ElectrodeTable.cpp:13
std::vector< std::string > m_groupReferences
The references to the ElectrodeGroup object for each electrode.
Definition ElectrodeTable.hpp:103
std::unique_ptr< VectorData > m_groupNamesDataset
The group names column for write.
Definition ElectrodeTable.hpp:119
static const std::string electrodeTablePath
The path to the ElectrodeTable.
Definition ElectrodeTable.hpp:81
std::vector< std::string > m_locationNames
The location names for each electrode.
Definition ElectrodeTable.hpp:98
void addElectrodes(std::vector< Channel > channelsInput)
Sets up the ElectrodeTable by adding electrodes and their metadata.
Definition ElectrodeTable.cpp:71
void setGroupPath(const std::string &groupPath)
Sets the group path of the ElectrodeTable.
std::unique_ptr< ElementIdentifiers > m_electrodeDataset
The row ids data object for write.
Definition ElectrodeTable.hpp:114
std::string getGroupPath() const
Gets the group path of the ElectrodeTable.
Definition ElectrodeTable.hpp:66
~ElectrodeTable()
Destructor.
Definition ElectrodeTable.cpp:42
void finalize()
Finalizes the ElectrodeTable.
Definition ElectrodeTable.cpp:83
static const std::string m_groupPathBase
The references path to the ElectrodeGroup.
Definition ElectrodeTable.hpp:108
std::vector< std::string > m_groupNames
The names of the ElectrodeGroup object for each electrode.
Definition ElectrodeTable.hpp:93
std::vector< int > m_electrodeNumbers
The global indices for each electrode.
Definition ElectrodeTable.hpp:88
Namespace for all classes related to the NWB data standard.
Definition TimeSeries.hpp:12