soma.h
1 #pragma once
2 
3 #include <morphio/properties.h>
4 
5 namespace morphio {
6 namespace mut {
7 class Soma
8 {
9  public:
10  Soma()
11  : _somaType(SOMA_UNDEFINED) {}
12 
13  Soma(const Property::PointLevel& pointProperties);
14  Soma(const Soma& soma);
15  Soma(const morphio::Soma& soma);
16 
20  inline std::vector<Point>& points() noexcept;
21  inline const std::vector<Point>& points() const noexcept;
27  inline std::vector<morphio::floatType>& diameters() noexcept;
28  inline const std::vector<morphio::floatType>& diameters() const noexcept;
34  inline SomaType type() const noexcept;
38  Point center() const;
39 
44  floatType surface() const;
45 
50  floatType maxDistance() const;
51 
52  inline Property::PointLevel& properties() noexcept;
53  inline const Property::PointLevel& properties() const noexcept;
54 
55  private:
56  friend class Morphology;
57  SomaType _somaType;
58  Property::PointLevel _pointProperties;
59 };
60 
61 inline std::vector<Point>& Soma::points() noexcept {
62  return _pointProperties._points;
63 }
64 
65 const std::vector<Point>& Soma::points() const noexcept {
66  return _pointProperties._points;
67 }
68 
69 inline std::vector<morphio::floatType>& Soma::diameters() noexcept {
70  return _pointProperties._diameters;
71 }
72 
73 const std::vector<morphio::floatType>& Soma::diameters() const noexcept {
74  return _pointProperties._diameters;
75 }
76 
77 inline SomaType Soma::type() const noexcept {
78  return _somaType;
79 }
80 
81 inline Property::PointLevel& Soma::properties() noexcept {
82  return _pointProperties;
83 }
84 
85 inline const Property::PointLevel& Soma::properties() const noexcept {
86  return _pointProperties;
87 }
88 
89 std::ostream& operator<<(std::ostream& os, const std::shared_ptr<Soma>& sectionPtr);
90 std::ostream& operator<<(std::ostream& os, const Soma& soma);
91 
92 } // namespace mut
93 } // namespace morphio
Definition: soma.h:29
Definition: morphology.h:27
Definition: soma.h:8
floatType maxDistance() const
floatType surface() const
std::vector< morphio::floatType > & diameters() noexcept
Definition: soma.h:69
SomaType type() const noexcept
Definition: soma.h:77
Point center() const
std::vector< Point > & points() noexcept
Definition: soma.h:61
Definition: endoplasmic_reticulum.h:5
Definition: properties.h:66