4 #include <morphio/types.h> 18 using Type = std::array<int, 2>;
23 using Type = std::array<int, 2>;
51 using Type = uint32_t;
56 std::vector<Point::Type> _points;
57 std::vector<Diameter::Type> _diameters;
58 std::vector<Perimeter::Type> _perimeters;
62 std::vector<Diameter::Type> diameters,
63 std::vector<Perimeter::Type> perimeters = {});
65 PointLevel(
const PointLevel& data, SectionRange range);
66 PointLevel& operator=(
const PointLevel& other);
71 std::vector<Section::Type> _sections;
72 std::vector<SectionType::Type> _sectionTypes;
73 std::map<int, std::vector<unsigned int>> _children;
87 std::vector<MitoNeuriteSectionId::Type> _sectionIds;
88 std::vector<MitoPathLength::Type> _relativePathLengths;
89 std::vector<MitoDiameter::Type> _diameters;
97 std::vector<MitoPathLength::Type> relativePathLengths,
98 std::vector<MitoDiameter::Type> diameters);
107 std::vector<Section::Type> _sections;
108 std::map<int, std::vector<unsigned int>> _children;
118 using SectionId_t = int32_t;
119 using SegmentId_t = int32_t;
123 SectionId_t sectionId;
124 SegmentId_t segmentId;
129 std::vector<PostSynapticDensity> _post_synaptic_density;
139 std::vector<uint32_t> _sectionIndices;
140 std::vector<morphio::floatType> _volumes;
141 std::vector<morphio::floatType> _surfaceAreas;
142 std::vector<uint32_t> _filamentCounts;
153 , _sectionId(sectionId)
154 , _points(std::move(points))
155 , _details(std::move(details))
156 , _lineNumber(lineNumber) {}
158 AnnotationType _type;
161 std::string _details;
181 MorphologyVersion _version = {
"undefined", 0, 0};
184 std::vector<Annotation> _annotations;
185 std::vector<Marker> _markers;
188 bool operator==(
const CellLevel& other)
const;
189 bool operator!=(
const CellLevel& other)
const;
191 std::string fileFormat()
const {
192 return std::get<0>(_version);
194 uint32_t majorVersion() {
195 return std::get<1>(_version);
197 uint32_t minorVersion() {
198 return std::get<2>(_version);
216 template <
typename T>
217 std::vector<typename T::Type>& get_mut() noexcept;
219 template <
typename T>
220 const std::vector<typename T::Type>&
get()
const noexcept;
222 const morphio::MorphologyVersion& version()
const noexcept {
223 return _cellLevel._version;
226 return _cellLevel._cellFamily;
229 return _cellLevel._somaType;
231 template <
typename T>
232 const std::map<int32_t, std::vector<uint32_t>>& children()
const noexcept;
236 std::ostream& operator<<(std::ostream& os,
const Properties& properties);
237 std::ostream& operator<<(std::ostream& os,
const PointLevel& pointLevel);
239 #define INSTANTIATE_TEMPLATE_GET(T, M) \ 241 inline std::vector<T::Type>& Properties::get_mut<T>() noexcept { \ 245 inline const std::vector<T::Type>& Properties::get<T>() const noexcept { \ 249 INSTANTIATE_TEMPLATE_GET(
Point, _pointLevel._points)
250 INSTANTIATE_TEMPLATE_GET(
Perimeter, _pointLevel._perimeters)
251 INSTANTIATE_TEMPLATE_GET(
Diameter, _pointLevel._diameters)
252 INSTANTIATE_TEMPLATE_GET(
MitoSection, _mitochondriaSectionLevel._sections)
253 INSTANTIATE_TEMPLATE_GET(
MitoPathLength, _mitochondriaPointLevel._relativePathLengths)
255 INSTANTIATE_TEMPLATE_GET(
MitoDiameter, _mitochondriaPointLevel._diameters)
256 INSTANTIATE_TEMPLATE_GET(
Section, _sectionLevel._sections)
257 INSTANTIATE_TEMPLATE_GET(
SectionType, _sectionLevel._sectionTypes)
259 #undef INSTANTIATE_TEMPLATE_GET 262 inline const std::map<int32_t, std::vector<uint32_t>>& Properties::children<Section>()
const 264 return _sectionLevel._children;
268 inline const std::map<int32_t, std::vector<uint32_t>>& Properties::children<MitoSection>()
const 270 return _mitochondriaSectionLevel._children;
Definition: properties.h:86
Definition: properties.h:106
Definition: properties.h:138
Definition: properties.h:180
Definition: properties.h:34
Neuron.
Definition: enums.h:45
Definition: properties.h:70
Undefined soma.
Definition: enums.h:52
std::array< morphio::floatType, 3 > Point
Definition: vector_types.h:24
Definition: properties.h:30
Definition: properties.h:46
Definition: dendritic_spine.h:12
Definition: properties.h:16
Definition: dendritic_spine.h:9
bool diff(const Morphology &left, const Morphology &right, morphio::enums::LogLevel verbose=morphio::enums::LogLevel::INFO)
Definition: properties.h:38
Definition: properties.h:203
Definition: properties.h:122
Definition: properties.h:26
Definition: properties.h:170
int32_t _sectionId
id of section that contains the marker
Definition: properties.h:173
Definition: properties.h:146
Definition: properties.h:21
CellFamily
Definition: enums.h:44
Definition: properties.h:128
SomaType
Definition: enums.h:51
Definition: properties.h:50
float floatType
Definition: vector_types.h:17
Definition: properties.h:55
SectionType
Definition: enums.h:61
Definition: properties.h:42