aqnwb 0.1.0
Loading...
Searching...
No Matches
ElectrodesTable.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
5#include "io/BaseIO.hpp"
9#include "spec/core.hpp"
10
11namespace AQNWB::NWB
12{
17{
18public:
19 // Register the ElectrodesTable as a subclass of Container
20 // REGISTER_SUBCLASS(ElectrodesTable, "core")
22
23
28 ElectrodesTable(std::shared_ptr<IO::BaseIO> io);
29
30 // required so we can call create
31 ElectrodesTable(const std::string& path, std::shared_ptr<IO::BaseIO> io);
32
37
48 Status initialize(const std::string& description =
49 "metadata about extracellular electrodes");
50
59
64 void addElectrodes(std::vector<Channel> channelsInput);
65
69 inline const static std::string electrodesTablePath =
70 "/general/extracellular_ephys/electrodes";
71
75 "location",
76 "the location of channel within the subject e.g. brain region")
77
80 VectorDataTyped<std::string>,
81 "group_name",
82 "the name of the ElectrodeGroup this electrode is a part of")
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
115
120
125};
126} // namespace AQNWB::NWB
AQNWB::Types::Status Status
Definition BaseIO.hpp:22
#define REGISTER_SUBCLASS(T, NAMESPACE)
Macro to register a subclass with the RegisteredType class registry.
Definition RegisteredType.hpp:410
#define DEFINE_REGISTERED_FIELD(name, registeredType, fieldPath, description)
Defines a lazy-loaded accessor function for reading fields that are RegisteredTypes.
Definition RegisteredType.hpp:528
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::vector< std::string > m_groupNames
The names of the ElectrodeGroup object for each electrode.
Definition ElectrodesTable.hpp:93
std::shared_ptr< RTYPE > readLocationColumn() const
std::vector< std::string > m_groupReferences
The references to the ElectrodeGroup object for each electrode.
Definition ElectrodesTable.hpp:103
std::unique_ptr< VectorData > m_locationsDataset
The locations column for write.
Definition ElectrodesTable.hpp:124
void addElectrodes(std::vector< Channel > channelsInput)
Sets up the ElectrodesTable by adding electrodes and their metadata.
Definition ElectrodesTable.cpp:67
static const std::string m_groupPathBase
The references path to the ElectrodeGroup.
Definition ElectrodesTable.hpp:108
~ElectrodesTable()
Destructor.
Definition ElectrodesTable.cpp:39
Status finalize()
Finalizes the ElectrodesTable.
Definition ElectrodesTable.cpp:79
std::vector< std::string > m_locationNames
The location names for each electrode.
Definition ElectrodesTable.hpp:98
static const std::string electrodesTablePath
The path to the ElectrodesTable.
Definition ElectrodesTable.hpp:69
std::vector< int > m_electrodeNumbers
The global indices for each electrode.
Definition ElectrodesTable.hpp:88
std::shared_ptr< RTYPE > readGroupNameColumn() const
ElectrodesTable(std::shared_ptr< IO::BaseIO > io)
Constructor.
Definition ElectrodesTable.cpp:13
std::unique_ptr< ElementIdentifiers > m_electrodeDataset
The row ids data object for write.
Definition ElectrodesTable.hpp:114
std::unique_ptr< VectorData > m_groupNamesDataset
The group names column for write.
Definition ElectrodesTable.hpp:119
A list of unique identifiers for values within a dataset, e.g. rows of a DynamicTable.
Definition ElementIdentifiers.hpp:13
An n-dimensional dataset representing a column of a DynamicTable.
Definition VectorData.hpp:16
A typed n-dimensional dataset representing a column of a DynamicTable.
Definition VectorData.hpp:105
Namespace for all classes related to the NWB data standard.
Definition TimeSeries.hpp:13
const std::string namespaceName
Definition core.hpp:21