Public Member Functions
morphio::Morphology Class Reference

#include <morphology.h>

Inheritance diagram for morphio::Morphology:
morphio::DendriticSpine morphio::GlialCell

Public Member Functions

 Morphology (const Morphology &) noexcept=default
Morphologyoperator= (const Morphology &) noexcept=default
 Morphology (Morphology &&) noexcept=default
Morphologyoperator= (Morphology &&) noexcept=default

Read API

class mut::Morphology
std::shared_ptr< Property::Propertiesproperties_
 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< SectionrootSections () const
std::vector< Sectionsections () 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 SomaTypesomaType () const
const CellFamilycellFamily () const
const MorphologyVersion & version () const
 Morphology (const Property::Properties &properties, unsigned int options)
template<typename Property >
const std::vector< typename Property::Type > & get () const

Detailed Description

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.

Constructor & Destructor Documentation

◆ Morphology() [1/4]

morphio::Morphology::Morphology ( const std::string &  path,
unsigned int  options = NO_MODIFIER 

Open the given source to a morphology file and parse it.

sourcepath to a source file.
optionsis 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);

◆ Morphology() [2/4]

morphio::Morphology::Morphology ( const HighFive::Group &  group,
unsigned int  options = NO_MODIFIER 

Constructor from an already parsed file

◆ Morphology() [3/4]

morphio::Morphology::Morphology ( const mut::Morphology )

Constructor from an instance of morphio::mut::Morphology

◆ Morphology() [4/4]

morphio::Morphology::Morphology ( const std::string &  contents,
const std::string &  extension,
unsigned int  options = NO_MODIFIER 

Load a morphology from a string

Member Function Documentation

◆ annotations()

const std::vector<Property::Annotation>& morphio::Morphology::annotations ( ) const

Return the annotation object

◆ breadth_begin()

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_end()

breadth_iterator morphio::Morphology::breadth_end ( ) const

breadth end iterator

◆ cellFamily()

const CellFamily& morphio::Morphology::cellFamily ( ) const

Return the cell family (neuron or glia)

◆ connectivity()

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_begin()

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_end()

depth_iterator morphio::Morphology::depth_end ( ) const

depth end iterator

◆ diameters()

const std::vector<morphio::floatType>& morphio::Morphology::diameters ( ) const

Return a vector with all diameters from all sections (soma points are not included)

◆ endoplasmicReticulum()

EndoplasmicReticulum morphio::Morphology::endoplasmicReticulum ( ) const

Return the endoplasmic reticulum object

◆ markers()

const std::vector<Property::Marker>& morphio::Morphology::markers ( ) const

Return the markers

◆ mitochondria()

Mitochondria morphio::Morphology::mitochondria ( ) const

Return the mitochondria object

◆ perimeters()

const std::vector<morphio::floatType>& morphio::Morphology::perimeters ( ) const

Return a vector with all perimeters from all sections

◆ points()

const Points& morphio::Morphology::points ( ) const

Return a vector with all points from all sections (soma points are not included)

◆ rootSections()

std::vector<Section> morphio::Morphology::rootSections ( ) const

Return a vector of all root sections (sections whose parent ID are -1)

◆ section()

Section morphio::Morphology::section ( uint32_t  id) const

Return the Section with the given id.

RawDataErrorif the id is out of range

◆ sectionOffsets()

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.

◆ sections()

std::vector<Section> morphio::Morphology::sections ( ) const

Return a vector containing all section objects

Notes: Soma is not included

◆ sectionTypes()

const std::vector<SectionType>& morphio::Morphology::sectionTypes ( ) const

Return a vector with the section type of every section

◆ soma()

Soma morphio::Morphology::soma ( ) const

Return the soma object

◆ somaType()

const SomaType& morphio::Morphology::somaType ( ) const

Return the soma type

◆ version()

const MorphologyVersion& morphio::Morphology::version ( ) const

Return the version