soma.h
1 #pragma once
2 
3 #include <morphio/morphology.h>
4 #include <morphio/types.h>
5 
6 namespace morphio {
28 class Soma
29 {
30  public:
32  range<const Point> points() const noexcept {
33  return properties_->_somaLevel._points;
34  }
35 
37  range<const floatType> diameters() const noexcept {
38  return properties_->_somaLevel._diameters;
39  }
40 
42  SomaType type() const noexcept {
43  return properties_->_cellLevel._somaType;
44  }
45 
47  Point center() const;
48 
53  floatType volume() const;
54 
59  floatType surface() const;
60 
65  floatType maxDistance() const;
66 
67  private:
68  explicit Soma(const std::shared_ptr<Property::Properties>& properties);
69  // TODO: find out why the following line does not work
70  // when friend class Morphology; is removed
71  // template <typename Property>
72  // friend const morphio::Soma morphio::Morphology::soma() const;
73  friend class Morphology;
74  friend class mut::Soma;
75 
76  std::shared_ptr<Property::Properties> properties_;
77 };
78 
79 } // namespace morphio
morphio::Soma::volume
floatType volume() const
morphio::enums::SomaType
SomaType
Definition: enums.h:59
morphio::Soma::center
Point center() const
Return the center of gravity of the soma points.
morphio::Morphology
Definition: morphology.h:24
morphio::mut::Soma
Definition: soma.h:13
morphio::Soma::points
range< const Point > points() const noexcept
Return the coordinates (x,y,z) of all soma points.
Definition: soma.h:32
morphio::Soma::surface
floatType surface() const
morphio::Soma::type
SomaType type() const noexcept
Return the soma type.
Definition: soma.h:42
morphio::Soma
Definition: soma.h:28
morphio::Soma::maxDistance
floatType maxDistance() const
morphio::Soma::diameters
range< const floatType > diameters() const noexcept
Return the diameters of all soma points.
Definition: soma.h:37