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 {
11 class Section
12 {
15 
16  public:
17  Section(const Section& section) = default;
18 
19  Section& operator=(const Section& section);
20 
21  Section(uint32_t id, const std::shared_ptr<property::Properties>& morphology);
22 
23  bool operator==(const Section& section) const;
24  bool operator!=(const Section& section) const;
25  bool operator<(const Section& other) const;
26 
30  std::vector<Section> predecessors() const;
31 
35  std::vector<Section> successors() const;
36 
40  std::vector<Section> neighbors() const;
41 
43  uint32_t id() const noexcept;
44 
48  floatType length() const;
49 
50  graph_iterator begin() const;
51  graph_iterator end() const;
52 
58  range<const Point> points() const;
59 
65  range<const floatType> diameters() const;
66 
70  VascularSectionType type() const;
71 
72  protected:
73  template <typename Property>
74  range<const typename Property::Type> get() const;
75 
76  uint32_t _id;
77  SectionRange _range;
78  std::shared_ptr<property::Properties> _properties;
79 };
80 
81 } // namespace vasculature
82 } // namespace morphio
83 
84 std::ostream& operator<<(std::ostream& os, const morphio::vasculature::Section& section);
85 std::ostream& operator<<(std::ostream& os, const morphio::range<const morphio::Point>& points);
Definition: section.h:12
std::vector< Section > predecessors() const
range< const Point > points() const
uint32_t id() const noexcept
VascularSectionType type() const
std::vector< Section > neighbors() const
std::vector< Section > successors() const
range< const floatType > diameters() const
Definition: iterators.hpp:11
Definition: endoplasmic_reticulum.h:5
Definition: properties.h:18