Brion  1.6.0
The Blue Brain C++ I/O library
brion::Morphology Class Reference

Read & write access to a Morphology file. More...

#include <morphology.h>

+ Inheritance diagram for brion::Morphology:
+ Collaboration diagram for brion::Morphology:

Public Member Functions

BRION_API ~Morphology ()
 Close morphology file. More...
 
Read API
BRION_API Morphology (const std::string &source)
 Open the given source to a morphology file for reading. More...
 
BRION_API Vector4fsPtr readPoints (MorphologyRepairStage stage) const
 Read points of morphology, representing x,y,z coordinates + diameter. More...
 
BRION_API Vector2isPtr readSections (MorphologyRepairStage stage) const
 Read sections of morphology, representing section start index and index of the parent section. More...
 
BRION_API SectionTypesPtr readSectionTypes () const
 Read section types of morphology. More...
 
BRION_API Vector2isPtr readApicals () const
 Read apical points of morphology, representing section and point index. More...
 
BRION_API MorphologyVersion getVersion () const
 
Write API
BRION_API Morphology (const std::string &target, MorphologyVersion version, bool overwrite=false)
 Open the given morphology file for write access. More...
 
BRION_API void writePoints (const Vector4fs &points, MorphologyRepairStage stage)
 Write points of morphology, representing x,y,z coordinates + diameter. More...
 
BRION_API void writeSections (const Vector2is &sections, MorphologyRepairStage stage)
 Write sections of morphology, representing section start index and index of parent the section. More...
 
BRION_API void writeSectionTypes (const SectionTypes &types)
 Write section types of morphology. More...
 
BRION_API void writeApicals (const Vector2is &apicals)
 Write apical points of morphology, representing section and point index. More...
 
BRION_API void flush ()
 Flush data to output. More...
 

Detailed Description

Read & write access to a Morphology file.

Following RAII, this class is ready to use after the creation and will ensure release of resources upon destruction.

Definition at line 37 of file morphology.h.

Constructor & Destructor Documentation

BRION_API brion::Morphology::~Morphology ( )

Close morphology file.

Version
1.0
BRION_API brion::Morphology::Morphology ( const std::string &  source)
explicit

Open the given source to a morphology file for reading.

Parameters
sourcefilepath to morphology file
Exceptions
std::runtime_errorif file is not a valid morphology file
Version
1.0
BRION_API brion::Morphology::Morphology ( const std::string &  target,
MorphologyVersion  version,
bool  overwrite = false 
)

Open the given morphology file for write access.

Parameters
targetfilepath of the output morphology file
versionthe output file format version, automatically chosen if undefined.
overwritetrue to allow overwrite of existing file
Exceptions
std::runtime_errorif file could not be created
Version
1.0

Member Function Documentation

BRION_API void brion::Morphology::flush ( )

Flush data to output.

Version
1.0
BRION_API Vector2isPtr brion::Morphology::readApicals ( ) const

Read apical points of morphology, representing section and point index.

Returns
section and point index of all apical points in the morphology
Version
1.0
BRION_API Vector4fsPtr brion::Morphology::readPoints ( MorphologyRepairStage  stage) const

Read points of morphology, representing x,y,z coordinates + diameter.

Parameters
stagethe repair stage to take the points from
Returns
x,y,z coords + diameter of all points of the morphology
Version
1.0
BRION_API Vector2isPtr brion::Morphology::readSections ( MorphologyRepairStage  stage) const

Read sections of morphology, representing section start index and index of the parent section.

Parameters
stagethe repair stage to take the section information from
Returns
First point and parent indices of all the sections of the morphology.
Version
1.0
BRION_API SectionTypesPtr brion::Morphology::readSectionTypes ( ) const

Read section types of morphology.

Returns
type of all sections of the morphology
Version
1.0
BRION_API void brion::Morphology::writeApicals ( const Vector2is &  apicals)

Write apical points of morphology, representing section and point index.

Parameters
apicalssection and point index of all apical points
Exceptions
std::runtime_errorif object not created with write ctor
std::runtime_errorif called for version 1 files
Version
1.0
BRION_API void brion::Morphology::writePoints ( const Vector4fs &  points,
MorphologyRepairStage  stage 
)

Write points of morphology, representing x,y,z coordinates + diameter.

Parameters
pointsx,y,z coords + diameter of all points of the morphology
stagethe repair stage to save those points to
Exceptions
std::runtime_errorif object not created with write ctor
Version
1.0
BRION_API void brion::Morphology::writeSections ( const Vector2is &  sections,
MorphologyRepairStage  stage 
)

Write sections of morphology, representing section start index and index of parent the section.

Parameters
sectionsindex and parent index of all sections of the morphology
stagethe repair stage to save those sections to
Exceptions
std::runtime_errorif object not created with write ctor
Version
1.0
BRION_API void brion::Morphology::writeSectionTypes ( const SectionTypes &  types)

Write section types of morphology.

Parameters
typestype of each section of the morphology
Exceptions
std::runtime_errorif object not created with write ctor
Version
1.0

The documentation for this class was generated from the following file: