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