section.h
1 #pragma once
2 #include <memory> // std::shared_ptr
3 #include <vector> // std::vector
4 
5 #include <morphio/types.h>
6 #include <morphio/vasc/properties.h>
7 #include <morphio/vasc/vasculature.h>
8 
9 namespace morphio {
10 namespace vasculature {
12 class Section
13 {
16 
17  public:
18  Section(const Section& section) = default;
19 
20  Section& operator=(const Section& section);
21 
22  Section(uint32_t id, const std::shared_ptr<property::Properties>& morphology);
23 
24  bool operator==(const Section& section) const;
25  bool operator!=(const Section& section) const;
26  bool operator<(const Section& other) const;
27 
31  std::vector<Section> predecessors() const;
32 
36  std::vector<Section> successors() const;
37 
41  std::vector<Section> neighbors() const;
42 
44  uint32_t id() const noexcept;
45 
49  floatType length() const;
50 
51  graph_iterator begin() const;
52  graph_iterator end() const;
53 
59  range<const Point> points() const;
60 
66  range<const floatType> diameters() const;
67 
71  VascularSectionType type() const;
72 
73  protected:
74  template <typename Property>
75  range<const typename Property::Type> get() const;
76 
77  uint32_t _id;
78  SectionRange _range;
79  std::shared_ptr<property::Properties> _properties;
80 };
81 
82 } // namespace vasculature
83 } // namespace morphio
84 
85 std::ostream& operator<<(std::ostream& os, const morphio::vasculature::Section& section);
86 std::ostream& operator<<(std::ostream& os, const morphio::range<const morphio::Point>& points);
Definition: section.h:12
Definition: properties.h:18
range< const Point > points() const
range< const floatType > diameters() const
Definition: dendritic_spine.h:9
std::vector< Section > neighbors() const
VascularSectionType type() const
uint32_t id() const noexcept
std::vector< Section > predecessors() const
std::vector< Section > successors() const
Definition: iterators.hpp:10
float floatType
Definition: vector_types.h:17
VascularSectionType
Definition: enums.h:98