soma.h
1 /* Copyright (c) 2013-2023, EPFL/Blue Brain Project
2  *
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #pragma once
6 
7 #include <morphio/properties.h> // Property
8 #include <morphio/soma.h> // morphio::soma
9 
10 namespace morphio {
11 namespace mut {
13 class Soma
14 {
15  public:
16  Soma() = default;
17  Soma(const Soma& soma) = default;
18 
19  explicit Soma(const Property::PointLevel& pointProperties);
20  explicit Soma(const morphio::Soma& soma);
21 
23  std::vector<Point>& points() noexcept {
24  return point_properties_._points;
25  }
26  const std::vector<Point>& points() const noexcept {
27  return point_properties_._points;
28  }
29 
31  std::vector<morphio::floatType>& diameters() noexcept {
32  return point_properties_._diameters;
33  }
34  const std::vector<morphio::floatType>& diameters() const noexcept {
35  return point_properties_._diameters;
36  }
37 
39  const SomaType& type() const noexcept {
40  return soma_type_;
41  }
42 
44  SomaType& type() noexcept {
45  return soma_type_;
46  }
47 
51  Point center() const;
52 
57  floatType surface() const;
58 
63  floatType maxDistance() const;
64 
65  Property::PointLevel& properties() noexcept {
66  return point_properties_;
67  }
68  const Property::PointLevel& properties() const noexcept {
69  return point_properties_;
70  }
71 
72  private:
73  friend class Morphology;
74 
75  SomaType soma_type_ = SOMA_UNDEFINED;
76  Property::PointLevel point_properties_;
77 };
78 
79 } // namespace mut
80 } // namespace morphio
morphio::mut::Soma::points
std::vector< Point > & points() noexcept
Return the coordinates (x,y,z) of all soma points.
Definition: soma.h:23
morphio::enums::SomaType
SomaType
Definition: enums.h:59
morphio::mut::Soma::type
const SomaType & type() const noexcept
Return the soma type.
Definition: soma.h:39
morphio::mut::Soma::type
SomaType & type() noexcept
Return the soma type.
Definition: soma.h:44
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:31
morphio::mut::Soma
Definition: soma.h:13
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