#include <morphology.h>
Public Member Functions | |
Morphology (const Morphology &) noexcept=default | |
Morphology & | operator= (const Morphology &) noexcept=default |
Morphology (Morphology &&) noexcept=default | |
Morphology & | operator= (Morphology &&) noexcept=default |
Read API | |
class | mut::Morphology |
std::shared_ptr< Property::Properties > | properties_ |
Morphology (const std::string &path, unsigned int options=NO_MODIFIER) | |
Morphology (const HighFive::Group &group, unsigned int options=NO_MODIFIER) | |
Morphology (const mut::Morphology &) | |
Morphology (const std::string &contents, const std::string &extension, unsigned int options=NO_MODIFIER) | |
Soma | soma () const |
Mitochondria | mitochondria () const |
EndoplasmicReticulum | endoplasmicReticulum () const |
const std::vector< Property::Annotation > & | annotations () const |
const std::vector< Property::Marker > & | markers () const |
std::vector< Section > | rootSections () const |
std::vector< Section > | sections () const |
Section | section (uint32_t id) const |
const Points & | points () const noexcept |
std::vector< uint32_t > | sectionOffsets () const |
const std::vector< morphio::floatType > & | diameters () const |
const std::vector< morphio::floatType > & | perimeters () const |
const std::vector< SectionType > & | sectionTypes () const |
const std::map< int, std::vector< unsigned int > > & | connectivity () const |
depth_iterator | depth_begin () const |
depth_iterator | depth_end () const |
breadth_iterator | breadth_begin () const |
breadth_iterator | breadth_end () const |
const SomaType & | somaType () const |
const CellFamily & | cellFamily () const |
const MorphologyVersion & | version () const |
Morphology (const Property::Properties &properties, unsigned int options) | |
template<typename Property > | |
const std::vector< typename Property::Type > & | get () const |
Class that gives read access to a Morphology file.
Following RAII, this class is ready to use after the creation and will ensure release of resources upon destruction.
|
explicit |
Open the given source to a morphology file and parse it.
source | path to a source file. |
options | is the modifier flags to be applied. All flags are defined in their corresponding morphio.enums.Option and can be composed. |
Example: Morphology("neuron.asc", TWO_POINTS_SECTIONS | SOMA_SPHERE);
|
explicit |
Constructor from an already parsed file
|
explicit |
Constructor from an instance of morphio::mut::Morphology
|
explicit |
Load a morphology from a string
const std::vector<Property::Annotation>& morphio::Morphology::annotations | ( | ) | const |
Return the annotation object
breadth_iterator morphio::Morphology::breadth_begin | ( | ) | const |
Breadth first iterator
If id == -1, the iteration will be successively performed starting at each root section
breadth_iterator morphio::Morphology::breadth_end | ( | ) | const |
breadth end iterator
const CellFamily& morphio::Morphology::cellFamily | ( | ) | const |
Return the cell family (neuron or glia)
const std::map<int, std::vector<unsigned int> >& morphio::Morphology::connectivity | ( | ) | const |
Return the graph connectivity of the morphology where each section is seen as a node Note: -1 is the soma node
depth_iterator morphio::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
depth_iterator morphio::Morphology::depth_end | ( | ) | const |
depth end iterator
const std::vector<morphio::floatType>& morphio::Morphology::diameters | ( | ) | const |
Return a vector with all diameters from all sections (soma points are not included)
EndoplasmicReticulum morphio::Morphology::endoplasmicReticulum | ( | ) | const |
Return the endoplasmic reticulum object
const std::vector<Property::Marker>& morphio::Morphology::markers | ( | ) | const |
Return the markers
Mitochondria morphio::Morphology::mitochondria | ( | ) | const |
Return the mitochondria object
const std::vector<morphio::floatType>& morphio::Morphology::perimeters | ( | ) | const |
Return a vector with all perimeters from all sections
|
noexcept |
Return a vector with all points from all sections (soma points are not included)
std::vector<Section> morphio::Morphology::rootSections | ( | ) | const |
Return a vector of all root sections (sections whose parent ID are -1)
Section morphio::Morphology::section | ( | uint32_t | id | ) | const |
Return the Section with the given id.
RawDataError | if the id is out of range |
std::vector<uint32_t> morphio::Morphology::sectionOffsets | ( | ) | const |
Returns a list with offsets to access data of a specific section in the points and diameters arrays.
Example: accessing diameters of n'th section will be located in the Morphology::diameters array from diameters[sectionOffsets(n)] to diameters[sectionOffsets(n+1)-1]
Note: for convenience, the last point of this array is the points() array size so that the above example works also for the last section.
std::vector<Section> morphio::Morphology::sections | ( | ) | const |
Return a vector containing all section objects
Notes: Soma is not included
const std::vector<SectionType>& morphio::Morphology::sectionTypes | ( | ) | const |
Return a vector with the section type of every section
Soma morphio::Morphology::soma | ( | ) | const |
Return the soma object
const SomaType& morphio::Morphology::somaType | ( | ) | const |
Return the soma type
const MorphologyVersion& morphio::Morphology::version | ( | ) | const |
Return the version