soma.h
1 #pragma once
2 
3 #include <morphio/properties.h> // Property
4 #include <morphio/soma.h> // morphio::soma
5 
6 namespace morphio {
7 namespace mut {
9 class Soma
10 {
11  public:
12  Soma() = default;
13  Soma(const Soma& soma) = default;
14 
15  explicit Soma(const Property::PointLevel& pointProperties);
16  explicit Soma(const morphio::Soma& soma);
17 
19  std::vector<Point>& points() noexcept {
20  return point_properties_._points;
21  }
22  const std::vector<Point>& points() const noexcept {
23  return point_properties_._points;
24  }
25 
27  std::vector<morphio::floatType>& diameters() noexcept {
28  return point_properties_._diameters;
29  }
30  const std::vector<morphio::floatType>& diameters() const noexcept {
31  return point_properties_._diameters;
32  }
33 
35  SomaType type() const noexcept {
36  return soma_type_;
37  }
41  Point center() const;
42 
47  floatType surface() const;
48 
53  floatType maxDistance() const;
54 
55  Property::PointLevel& properties() noexcept {
56  return point_properties_;
57  }
58  const Property::PointLevel& properties() const noexcept {
59  return point_properties_;
60  }
61 
62  private:
63  friend class Morphology;
64 
65  SomaType soma_type_ = SOMA_UNDEFINED;
66  Property::PointLevel point_properties_;
67 };
68 
69 } // namespace mut
70 } // namespace morphio
morphio::mut::Soma::points
std::vector< Point > & points() noexcept
Return the coordinates (x,y,z) of all soma points.
Definition: soma.h:19
morphio::enums::SomaType
SomaType
Definition: enums.h:52
morphio::mut::Soma::center
Point center() const
morphio::mut::Soma::diameters
std::vector< morphio::floatType > & diameters() noexcept
Return the diameters of all soma points.
Definition: soma.h:27
morphio::mut::Soma
Definition: soma.h:9
morphio::mut::Soma::type
SomaType type() const noexcept
Return the soma type.
Definition: soma.h:35
morphio::mut::Soma::maxDistance
floatType maxDistance() const
morphio::Soma
Definition: soma.h:28
morphio::mut::Soma::surface
floatType surface() const
morphio::Property::PointLevel
Definition: properties.h:62