23 #include <morphio/types.h>
30 using Type = std::array<int, 2>;
35 using Type = std::array<int, 2>;
39 using Type = morphio::Point;
43 using Type = morphio::SectionType;
47 using Type = floatType;
51 using Type = floatType;
55 using Type = floatType;
59 using Type = floatType;
63 using Type = uint32_t;
67 std::vector<Point::Type> _points;
68 std::vector<Diameter::Type> _diameters;
69 std::vector<Perimeter::Type> _perimeters;
73 std::vector<Diameter::Type> diameters,
74 std::vector<Perimeter::Type> perimeters = {});
81 std::vector<Section::Type> _sections;
82 std::vector<SectionType::Type> _sectionTypes;
83 std::map<int, std::vector<unsigned int>> _children;
89 bool diff(
const SectionLevel& other, LogLevel logLevel)
const;
93 std::vector<MitoNeuriteSectionId::Type> _sectionIds;
94 std::vector<MitoPathLength::Type> _relativePathLengths;
95 std::vector<MitoDiameter::Type> _diameters;
103 std::vector<MitoPathLength::Type> relativePathLengths,
104 std::vector<MitoDiameter::Type> diameters);
112 std::vector<Section::Type> _sections;
113 std::map<int, std::vector<unsigned int>> _children;
121 std::vector<uint32_t> _sectionIndices;
122 std::vector<morphio::floatType> _volumes;
123 std::vector<morphio::floatType> _surfaceAreas;
124 std::vector<uint32_t> _filamentCounts;
134 , _sectionId(sectionId)
135 , _points(std::move(points))
136 , _details(std::move(details))
137 , _lineNumber(lineNumber) {}
139 AnnotationType _type;
142 std::string _details;
153 MorphologyVersion _version = {
"undefined", 0, 0};
154 morphio::CellFamily _cellFamily = NEURON;
155 SomaType _somaType = SOMA_UNDEFINED;
156 std::vector<Annotation> _annotations;
157 std::vector<Marker> _markers;
159 bool diff(
const CellLevel& other, LogLevel logLevel)
const;
160 bool operator==(
const CellLevel& other)
const;
161 bool operator!=(
const CellLevel& other)
const;
162 std::string fileFormat()
const;
163 uint32_t majorVersion();
164 uint32_t minorVersion();
179 template <
typename T>
180 std::vector<typename T::Type>& get_mut() noexcept;
182 template <
typename T>
183 const std::vector<typename T::Type>& get()
const noexcept;
185 const morphio::MorphologyVersion& version()
const noexcept {
186 return _cellLevel._version;
188 const morphio::CellFamily& cellFamily()
const noexcept {
189 return _cellLevel._cellFamily;
191 const morphio::SomaType& somaType()
const noexcept {
192 return _cellLevel._somaType;
194 template <
typename T>
195 const std::map<int32_t, std::vector<uint32_t>>& children()
const noexcept;
198 std::ostream& operator<<(std::ostream& os,
const Properties& properties);
199 std::ostream& operator<<(std::ostream& os,
const PointLevel& pointLevel);
201 #define INSTANTIATE_TEMPLATE_GET(T, M) \
203 inline std::vector<T::Type>& Properties::get_mut<T>() noexcept { \
207 inline const std::vector<T::Type>& Properties::get<T>() const noexcept { \
211 INSTANTIATE_TEMPLATE_GET(
Point, _pointLevel._points)
212 INSTANTIATE_TEMPLATE_GET(
Perimeter, _pointLevel._perimeters)
213 INSTANTIATE_TEMPLATE_GET(
Diameter, _pointLevel._diameters)
214 INSTANTIATE_TEMPLATE_GET(
MitoSection, _mitochondriaSectionLevel._sections)
215 INSTANTIATE_TEMPLATE_GET(
MitoPathLength, _mitochondriaPointLevel._relativePathLengths)
217 INSTANTIATE_TEMPLATE_GET(
MitoDiameter, _mitochondriaPointLevel._diameters)
218 INSTANTIATE_TEMPLATE_GET(
Section, _sectionLevel._sections)
219 INSTANTIATE_TEMPLATE_GET(
SectionType, _sectionLevel._sectionTypes)
221 #undef INSTANTIATE_TEMPLATE_GET
224 inline const std::map<int32_t, std::vector<uint32_t>>& Properties::children<Section>() const
226 return _sectionLevel._children;
230 inline const std::map<int32_t, std::vector<uint32_t>>& Properties::children<MitoSection>() const
232 return _mitochondriaSectionLevel._children;
Definition: endoplasmic_reticulum.h:5
Definition: properties.h:127
Definition: properties.h:152
Definition: properties.h:50
Definition: properties.h:120
Definition: properties.h:146
Definition: properties.h:58
Definition: properties.h:62
Definition: properties.h:54
Definition: properties.h:33
Definition: properties.h:92
Definition: properties.h:111
Definition: properties.h:46
Definition: properties.h:38
Definition: properties.h:66
Definition: properties.h:168
Definition: properties.h:28
Definition: properties.h:80
Definition: properties.h:42