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:
34  inline range<const Point> points() const noexcept;
35 
39  inline range<const floatType> diameters() const noexcept;
40 
44  inline SomaType type() const noexcept;
48  Point center() const;
49 
54  floatType volume() const;
55 
60  floatType surface() const;
61 
66  floatType maxDistance() const;
67 
68  private:
69  explicit Soma(const std::shared_ptr<Property::Properties>& properties);
70  // TODO: find out why the following line does not work
71  // when friend class Morphology; is removed
72  // template <typename Property>
73  // friend const morphio::Soma morphio::Morphology::soma() const;
74  friend class Morphology;
75  friend class mut::Soma;
76 
77  std::shared_ptr<Property::Properties> properties_;
78 };
79 
80 inline range<const Point> Soma::points() const noexcept {
81  return properties_->_somaLevel._points;
82 }
83 
84 inline range<const floatType> Soma::diameters() const noexcept {
85  return properties_->_somaLevel._diameters;
86 }
87 
88 inline SomaType Soma::type() const noexcept {
89  return properties_->_cellLevel._somaType;
90 }
91 
92 } // namespace morphio
morphio::Soma::volume
floatType volume() const
morphio::enums::SomaType
SomaType
Definition: enums.h:52
morphio::Soma::center
Point center() const
morphio::Soma::diameters
range< const floatType > diameters() const noexcept
Definition: soma.h:84
morphio::Morphology
Definition: morphology.h:20
morphio::mut::Soma
Definition: soma.h:9
morphio::Soma::surface
floatType surface() const
morphio::Soma::type
SomaType type() const noexcept
Definition: soma.h:88
morphio::Soma::points
range< const Point > points() const noexcept
Definition: soma.h:80
morphio::Soma
Definition: soma.h:28
morphio::Soma::maxDistance
floatType maxDistance() const