Public Member Functions
morphio::Morphology Class Reference

#include <morphology.h>

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

Public Member Functions

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

Read API

class mut::Morphology
 
std::shared_ptr< Property::Properties_properties
 
 Morphology (const std::string &source, unsigned int options=NO_MODIFIER)
 
 Morphology (const HighFive::Group &group, unsigned int options=NO_MODIFIER)
 
 Morphology (mut::Morphology)
 
Soma soma () const
 
Mitochondria mitochondria () const
 
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 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
 

Detailed Description

Read access 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()

morphio::Morphology::Morphology ( const std::string &  source,
unsigned int  options = NO_MODIFIER 
)
explicit

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

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);

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

◆ 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

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

const 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
noexcept

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.

Exceptions
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 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.

◆ 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