#include <morphology.h>
Public Member Functions | |
Morphology (std::shared_ptr< WarningHandler > warning_handler=nullptr) | |
Morphology (const std::string &uri, unsigned int options=NO_MODIFIER, std::shared_ptr< WarningHandler > warning_handler=nullptr) | |
Morphology (const HighFive::Group &group, unsigned int options=NO_MODIFIER, std::shared_ptr< WarningHandler > warning_handler=nullptr) | |
Build a mutable Morphology from an HighFive::Group. | |
Morphology (const mut::Morphology &morphology, unsigned int options=NO_MODIFIER, std::shared_ptr< WarningHandler > warning_handler=nullptr) | |
Build a mutable Morphology from a mutable morphology. | |
Morphology (const morphio::Morphology &morphology, unsigned int options=NO_MODIFIER, std::shared_ptr< WarningHandler > warning_handler=nullptr) | |
Build a mutable Morphology from a read-only morphology. | |
const std::vector< std::shared_ptr< Section > > & | rootSections () const noexcept |
Returns all section ids at the tree root. | |
const std::map< uint32_t, std::shared_ptr< Section > > & | sections () const noexcept |
Returns the dictionary id -> Section for this tree. | |
std::shared_ptr< Soma > & | soma () noexcept |
const std::shared_ptr< Soma > & | soma () const noexcept |
Mitochondria & | mitochondria () noexcept |
Return the mitochondria container class. | |
const Mitochondria & | mitochondria () const noexcept |
Return the mitochondria container class. | |
EndoplasmicReticulum & | endoplasmicReticulum () noexcept |
Return the endoplasmic reticulum container class. | |
const EndoplasmicReticulum & | endoplasmicReticulum () const noexcept |
Return the endoplasmic reticulum container class. | |
const std::vector< Property::Annotation > & | annotations () const noexcept |
Return the annotation objects. | |
const std::vector< Property::Marker > & | markers () const noexcept |
Return the markers from the ASC file. | |
const std::shared_ptr< Section > & | section (uint32_t id) const |
depth_iterator | depth_begin () const |
depth_iterator | depth_end () const |
breadth_iterator | breadth_begin () const |
breadth_iterator | breadth_end () const |
void | deleteSection (std::shared_ptr< Section > section, bool recursive=true) |
std::shared_ptr< Section > | appendRootSection (const morphio::Section &, bool recursive=false) |
std::shared_ptr< Section > | appendRootSection (const std::shared_ptr< Section > §ion, bool recursive=false) |
std::shared_ptr< Section > | appendRootSection (const Property::PointLevel &, SectionType sectionType) |
Append a root Section. | |
void | applyModifiers (unsigned int modifierFlags) |
SomaType | somaType () const noexcept |
Return the soma type. | |
CellFamily | cellFamily () const noexcept |
Return the cell family (neuron or glia) | |
MorphologyVersion | version () const noexcept |
Return the version. | |
void | write (const std::string &filename) const |
Write file to H5, SWC, ASC format depending on filename extension. | |
void | addAnnotation (const Property::Annotation &annotation) |
void | addMarker (const Property::Marker &marker) |
Property::Properties | buildReadOnly () const |
Return the data structure used to create read-only morphologies. | |
std::unordered_map< int, std::vector< unsigned int > > | connectivity () |
void | removeUnifurcations () |
std::shared_ptr< WarningHandler > | getWarningHandler () const |
Public Attributes | |
std::shared_ptr< Soma > | _soma |
std::shared_ptr< Property::CellLevel > | _cellProperties |
EndoplasmicReticulum | _endoplasmicReticulum |
Property::DendriticSpine::Level | _dendriticSpineLevel |
Friends | |
class | Section |
void | modifiers::nrn_order (mut::Morphology &morpho) |
bool | diff (const Morphology &left, const Morphology &right, enums::LogLevel verbose) |
Mutable(editable) morphio::Morphology
|
explicit |
Build a mutable Morphology from an on-disk morphology
options is the modifier flags to be applied. All flags are defined in their enum: morphio::enum::Option and can be composed.
Example: Morphology("neuron.asc", TWO_POINTS_SECTIONS | SOMA_SPHERE);
std::shared_ptr<Section> morphio::mut::Morphology::appendRootSection | ( | const morphio::Section & | , |
bool | recursive = false |
||
) |
Append the existing morphio::Section as a root section
If recursive == true, all descendent will be appended as well
std::shared_ptr<Section> morphio::mut::Morphology::appendRootSection | ( | const std::shared_ptr< Section > & | section, |
bool | recursive = false |
||
) |
Append an existing Section as a root section
If recursive == true, all descendent will be appended as well
breadth_iterator morphio::mut::Morphology::breadth_begin | ( | ) | const |
Breadth first iterator
If id == -1, the iteration will be successively performed starting at each root section
std::unordered_map<int, std::vector<unsigned int> > morphio::mut::Morphology::connectivity | ( | ) |
Return the graph connectivity of the morphology where each section is seen as a node Note: -1 is the soma node
void morphio::mut::Morphology::deleteSection | ( | std::shared_ptr< Section > | section, |
bool | recursive = true |
||
) |
Delete the given section
Will silently fail if the section is not part of the tree
If recursive == true, all descendent sections will be deleted as well Else, children will be re-attached to their grand-parent
depth_iterator morphio::mut::Morphology::depth_begin | ( | ) | const |
Depth first iterator starting at a given section id
If id == -1, the iteration will start at each root section, successively
void morphio::mut::Morphology::removeUnifurcations | ( | ) |
Fixes the morphology single child sections and issues warnings if the section starts and ends are inconsistent
|
inline |
Get the shared pointer for the given section
Note: multiple morphologies can share the same Section instances.
|
inlinenoexcept |