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);
32 , _soma(std::make_shared<Soma>())
62 inline const std::vector<std::shared_ptr<Section>>&
rootSections()
const noexcept;
67 inline const std::map<uint32_t, std::shared_ptr<Section>>&
sections()
const noexcept;
74 inline std::shared_ptr<Soma>&
soma() noexcept;
81 inline const std::shared_ptr<Soma>&
soma()
const noexcept;
104 inline const std::vector<Property::Annotation>&
annotations()
const noexcept;
109 inline const std::vector<Property::Marker>&
markers()
const noexcept;
116 inline const std::shared_ptr<Section>&
section(uint32_t
id)
const;
149 void deleteSection(std::shared_ptr<Section> section,
bool recursive =
true);
163 std::shared_ptr<Section>
appendRootSection(
const std::shared_ptr<Section>& section,
164 bool recursive =
false);
172 void applyModifiers(
unsigned int modifierFlags);
187 inline MorphologyVersion
version()
const noexcept;
192 void write(
const std::string& filename);
207 std::unordered_map<int, std::vector<unsigned int>>
connectivity();
227 morphio::enums::LogLevel verbose);
230 uint32_t _register(
const std::shared_ptr<Section>&);
233 std::shared_ptr<Soma> _soma;
234 std::shared_ptr<morphio::Property::CellLevel> _cellProperties;
235 std::vector<std::shared_ptr<Section>> _rootSections;
236 std::map<uint32_t, std::shared_ptr<Section>> _sections;
242 std::map<uint32_t, uint32_t> _parent;
243 std::map<uint32_t, std::vector<std::shared_ptr<Section>>> _children;
246 void eraseByValue(std::vector<std::shared_ptr<Section>>& vec,
247 const std::shared_ptr<Section> section);
251 return _rootSections;
267 return _mitochondria;
271 return _mitochondria;
275 return _endoplasmicReticulum;
279 return _endoplasmicReticulum;
283 return _sections.at(
id);
287 return _soma->type();
291 return _cellProperties->_annotations;
295 return _cellProperties->_markers;
299 return _cellProperties->_cellFamily;
303 return _cellProperties->_version;
307 _cellProperties->_annotations.push_back(annotation);
311 _cellProperties->_markers.push_back(marker);
CellFamily cellFamily() const noexcept
Definition: morphology.h:298
void _raiseIfUnifurcations()
Definition: section_iterators.hpp:53
const std::map< uint32_t, std::shared_ptr< Section > > & sections() const noexcept
Definition: morphology.h:254
const std::vector< Property::Annotation > & annotations() const noexcept
Definition: morphology.h:290
MorphologyVersion version() const noexcept
Definition: morphology.h:302
Definition: properties.h:180
const std::vector< Property::Marker > & markers() const noexcept
Definition: morphology.h:294
Property::Properties buildReadOnly() const
Mitochondria & mitochondria() noexcept
Definition: morphology.h:266
Read morphology as is without any modification.
Definition: enums.h:13
breadth_iterator breadth_begin() const
Definition: dendritic_spine.h:9
Definition: morphology.h:27
depth_iterator depth_begin() const
void removeUnifurcations()
std::unordered_map< int, std::vector< unsigned int > > connectivity()
Definition: endoplasmic_reticulum.h:9
const std::vector< std::shared_ptr< Section > > & rootSections() const noexcept
Definition: morphology.h:250
SomaType somaType() const noexcept
Definition: morphology.h:286
Definition: section_iterators.hpp:81
std::shared_ptr< Section > appendRootSection(const morphio::Section &, bool recursive=false)
const std::shared_ptr< Section > & section(uint32_t id) const
Definition: morphology.h:282
Definition: properties.h:203
Definition: morphology.h:20
Definition: mitochondria.h:21
Definition: properties.h:170
friend bool diff(const Morphology &left, const Morphology &right, morphio::enums::LogLevel verbose)
Definition: properties.h:146
CellFamily
Definition: enums.h:44
Definition: errorMessages.h:106
Definition: properties.h:128
std::shared_ptr< Soma > & soma() noexcept
Definition: morphology.h:258
void write(const std::string &filename)
SomaType
Definition: enums.h:51
Definition: properties.h:55
SectionType
Definition: enums.h:61
Definition: errorMessages.h:33
void deleteSection(std::shared_ptr< Section > section, bool recursive=true)
EndoplasmicReticulum & endoplasmicReticulum() noexcept
Definition: morphology.h:274