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
47 Status initialize(const std::string& description =
48 "metadata about extracellular electrodes");
49
58
63 void addElectrodes(std::vector<Channel> channelsInput);
64
68 inline const static std::string electrodeTablePath =
69 "/general/extracellular_ephys/electrodes";
70
74 "location",
75 "the location of channel within the subject e.g. brain region")
76
79 VectorDataTyped<std::string>,
80 "group_name",
81 "the name of the ElectrodeGroup this electrode is a part of")
82
83private:
87 std::vector<int> m_electrodeNumbers;
88
92 std::vector<std::string> m_groupNames;
93
97 std::vector<std::string> m_locationNames;
98
102 std::vector<std::string> m_groupReferences;
103
107 inline const static std::string m_groupPathBase =
108 "/general/extracellular_ephys";
109
114
119
124};
125} // namespace AQNWB::NWB
AQNWB::Types::Status Status
Definition BaseIO.hpp:22
#define REGISTER_SUBCLASS_WITH_TYPENAME(T, NAMESPACE, TYPENAME)
Macro to register a subclass with the RegisteredType class registry.
Definition RegisteredType.hpp:341
#define DEFINE_REGISTERED_FIELD(name, registeredType, fieldPath, description)
Defines a lazy-loaded accessor function for reading fields that are RegisteredTypes.
Definition RegisteredType.hpp:439
Status initialize()
Initialize the container.
Definition Container.cpp:20
DynamicTable(const std::string &path, std::shared_ptr< IO::BaseIO > io)
Constructor.
Definition DynamicTable.cpp:12
std::unique_ptr< VectorData > m_locationsDataset
The locations column for write.
Definition ElectrodeTable.hpp:123
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:102
std::unique_ptr< VectorData > m_groupNamesDataset
The group names column for write.
Definition ElectrodeTable.hpp:118
static const std::string electrodeTablePath
The path to the ElectrodeTable.
Definition ElectrodeTable.hpp:68
std::vector< std::string > m_locationNames
The location names for each electrode.
Definition ElectrodeTable.hpp:97
void addElectrodes(std::vector< Channel > channelsInput)
Sets up the ElectrodeTable by adding electrodes and their metadata.
Definition ElectrodeTable.cpp:69
std::unique_ptr< ElementIdentifiers > m_electrodeDataset
The row ids data object for write.
Definition ElectrodeTable.hpp:113
std::shared_ptr< RTYPE > readGroupNameColumn() const
Status finalize()
Finalizes the ElectrodeTable.
Definition ElectrodeTable.cpp:81
std::shared_ptr< RTYPE > readLocationColumn() const
~ElectrodeTable()
Destructor.
Definition ElectrodeTable.cpp:39
static const std::string m_groupPathBase
The references path to the ElectrodeGroup.
Definition ElectrodeTable.hpp:107
std::vector< std::string > m_groupNames
The names of the ElectrodeGroup object for each electrode.
Definition ElectrodeTable.hpp:92
std::vector< int > m_electrodeNumbers
The global indices for each electrode.
Definition ElectrodeTable.hpp:87
A list of unique identifiers for values within a dataset, e.g. rows of a DynamicTable.
Definition ElementIdentifiers.hpp:12
An n-dimensional dataset representing a column of a DynamicTable.
Definition VectorData.hpp:15
A typed n-dimensional dataset representing a column of a DynamicTable.
Definition VectorData.hpp:74
Namespace for all classes related to the NWB data standard.
Definition TimeSeries.hpp:12