8 #include <unordered_map>
12 #include <morphio/errorMessages.h>
13 #include <morphio/exceptions.h>
14 #include <morphio/mut/endoplasmic_reticulum.h>
15 #include <morphio/mut/mitochondria.h>
16 #include <morphio/mut/soma.h>
17 #include <morphio/properties.h>
18 #include <morphio/section.h>
19 #include <morphio/types.h>
23 bool _checkDuplicatePoint(
const std::shared_ptr<Section>& parent,
24 const std::shared_ptr<Section>& current);
31 , _soma(std::make_shared<Soma>())
44 Morphology(
const std::string& uri,
unsigned int options = NO_MODIFIER);
61 inline const std::vector<std::shared_ptr<Section>>&
rootSections() const noexcept;
66 inline const std::map<uint32_t, std::shared_ptr<
Section>>&
sections() const noexcept;
73 inline std::shared_ptr<
Soma>&
soma() noexcept;
80 inline const std::shared_ptr<
Soma>&
soma() const noexcept;
103 inline const std::vector<Property::Annotation>&
annotations() const noexcept;
108 inline const std::vector<Property::Marker>&
markers() const noexcept;
115 inline const std::shared_ptr<
Section>&
section(uint32_t
id) const;
163 bool recursive = false);
169 SectionType sectionType);
171 void applyModifiers(
unsigned int modifierFlags);
176 inline SomaType
somaType() const noexcept;
181 inline CellFamily
cellFamily() const noexcept;
186 inline MorphologyVersion
version() const noexcept;
191 void write(const std::
string& filename);
193 inline
void addAnnotation(const
morphio::Property::Annotation& annotation);
194 inline
void addMarker(const
morphio::Property::Marker& marker);
226 morphio::enums::LogLevel verbose);
227 morphio::readers::ErrorMessages _err;
229 uint32_t _register(const std::shared_ptr<
Section>&);
232 std::shared_ptr<
Soma> _soma;
233 std::shared_ptr<
morphio::Property::CellLevel> _cellProperties;
234 std::vector<std::shared_ptr<
Section>> _rootSections;
235 std::map<uint32_t, std::shared_ptr<
Section>> _sections;
239 std::map<uint32_t, uint32_t> _parent;
240 std::map<uint32_t, std::vector<std::shared_ptr<
Section>>> _children;
243 void eraseByValue(std::vector<std::shared_ptr<
Section>>& vec,
248 return _rootSections;
264 return _mitochondria;
268 return _mitochondria;
272 return _endoplasmicReticulum;
276 return _endoplasmicReticulum;
280 return _sections.at(
id);
284 return _soma->type();
288 return _cellProperties->_annotations;
292 return _cellProperties->_markers;
296 return _cellProperties->_cellFamily;
300 return _cellProperties->_version;
304 _cellProperties->_annotations.push_back(annotation);
308 _cellProperties->_markers.push_back(marker);
Definition: morphology.h:22
Definition: section_iterators.hpp:54
Definition: section_iterators.hpp:82
Definition: endoplasmic_reticulum.h:14
Definition: mitochondria.h:29
Definition: morphology.h:27
void write(const std::string &filename)
friend bool diff(const Morphology &left, const Morphology &right, morphio::enums::LogLevel verbose)
breadth_iterator breadth_begin() const
void _raiseIfUnifurcations()
std::shared_ptr< Soma > & soma() noexcept
Definition: morphology.h:255
void removeUnifurcations()
const std::vector< Property::Marker > & markers() const noexcept
Definition: morphology.h:291
std::unordered_map< int, std::vector< unsigned int > > connectivity()
const std::shared_ptr< Section > & section(uint32_t id) const
Definition: morphology.h:279
Mitochondria & mitochondria() noexcept
Definition: morphology.h:263
std::shared_ptr< Section > appendRootSection(const morphio::Section &, bool recursive=false)
Morphology(const std::string &uri, unsigned int options=NO_MODIFIER)
void deleteSection(std::shared_ptr< Section > section, bool recursive=true)
CellFamily cellFamily() const noexcept
Definition: morphology.h:295
const std::map< uint32_t, std::shared_ptr< Section > > & sections() const noexcept
Definition: morphology.h:251
const std::vector< Property::Annotation > & annotations() const noexcept
Definition: morphology.h:287
SomaType somaType() const noexcept
Definition: morphology.h:283
depth_iterator depth_begin() const
Morphology(const morphio::Morphology &morphology, unsigned int options=NO_MODIFIER)
MorphologyVersion version() const noexcept
Definition: morphology.h:299
EndoplasmicReticulum & endoplasmicReticulum() noexcept
Definition: morphology.h:271
Morphology(const morphio::mut::Morphology &morphology, unsigned int options=NO_MODIFIER)
Property::Properties buildReadOnly() const
const std::vector< std::shared_ptr< Section > > & rootSections() const noexcept
Definition: morphology.h:247
Definition: endoplasmic_reticulum.h:5
Definition: properties.h:127
Definition: properties.h:152
Definition: properties.h:146