#include <SwcSegment.h>
Public Member Functions | |
SwcSegment () | |
SwcSegment (const string &line) | |
SwcSegment (int i, short type, double x, double y, double z, double r, int parent) | |
bool | OK () const |
void | setBad () |
unsigned int | parent () const |
void | setParent (unsigned int pa) |
unsigned int | myIndex () const |
void | addChild (unsigned int kid) |
void | figureOutType () |
const vector< int > & | kids () const |
void | replaceKids (const vector< int > &kids) |
unsigned short | type () const |
double | radius () const |
double | length () const |
double | L () const |
double | distance (const SwcSegment &other) const |
const Vec & | vec () const |
void | setGeometricalDistanceFromSoma (const SwcSegment &soma) |
void | setCumulativeDistance (double len, double L, double pSoma, double eSoma) |
double | getPathDistFromSoma () const |
double | getGeomDistFromSoma () const |
double | getElecDistFromSoma () const |
Static Public Attributes | |
static const short | UNDEF = 0 |
static const short | SOMA = 1 |
static const short | AXON = 2 |
static const short | DEND = 3 |
static const short | APICAL = 4 |
static const short | FORK = 5 |
static const short | END = 6 |
static const short | CUSTOM = 7 |
static const short | BadSegment = 8 |
static const short | AXON_FORK = 10 |
static const short | AXON_END = 11 |
static const short | APICAL_FORK = 12 |
static const short | APICAL_END = 13 |
static const string | typeName [] |
Protected Attributes | |
unsigned int | myIndex_ |
short | type_ |
Index of self. | |
Vec | v_ |
double | radius_ |
coordinates of end of segment | |
double | length_ |
Radius of segment. | |
double | L_ |
Length of segment. | |
unsigned int | parent_ |
Number of length constants in segment. | |
double | pathDistanceFromSoma_ |
Index of parent. Is ~0 for soma. | |
double | geometricalDistanceFromSoma_ |
geometrical distance from soma. | |
double | electrotonicDistanceFromSoma_ |
electrotonic dist from soma, summed along dend. | |
vector< int > | kids_ |
This defines a single segment in an SWC file used in NeuroMorpho Note that this is not going to work well for dendritic spines which come off in the middle of a parent compartment, and which have to be started from the surface rather than the axis of the dendrite.
SwcSegment::SwcSegment | ( | ) | [inline] |
SwcSegment::SwcSegment | ( | const string & | line | ) |
SwcSegment::SwcSegment | ( | int | i, | |
short | type, | |||
double | x, | |||
double | y, | |||
double | z, | |||
double | r, | |||
int | parent | |||
) |
References parent_.
void SwcSegment::addChild | ( | unsigned int | kid | ) | [inline] |
References kids_.
double SwcSegment::distance | ( | const SwcSegment & | other | ) | const [inline] |
References Vec::distance(), and v_.
Referenced by ReadSwc::cleanZeroLength().
void SwcSegment::figureOutType | ( | ) |
double SwcSegment::getElecDistFromSoma | ( | ) | const [inline] |
References electrotonicDistanceFromSoma_.
double SwcSegment::getGeomDistFromSoma | ( | ) | const [inline] |
References geometricalDistanceFromSoma_.
double SwcSegment::getPathDistFromSoma | ( | ) | const [inline] |
References pathDistanceFromSoma_.
const vector< int >& SwcSegment::kids | ( | ) | const [inline] |
References kids_.
Referenced by ReadSwc::cleanZeroLength(), and ReadSwc::parseBranches().
double SwcSegment::L | ( | ) | const [inline] |
References L_.
double SwcSegment::length | ( | ) | const [inline] |
References length_.
unsigned int SwcSegment::myIndex | ( | ) | const [inline] |
References myIndex_.
Referenced by ReadSwc::assignKids(), ReadSwc::build(), ReadSwc::cleanZeroLength(), SwcBranch::printDiagnostics(), and ReadSwc::validate().
bool SwcSegment::OK | ( | ) | const [inline] |
References BadSegment, CUSTOM, type_, and UNDEF.
Referenced by ReadSwc::parseBranches().
unsigned int SwcSegment::parent | ( | ) | const [inline] |
References parent_.
Referenced by ReadSwc::assignKids(), ReadSwc::build(), ReadSwc::cleanZeroLength(), SwcBranch::printDiagnostics(), and ReadSwc::validate().
double SwcSegment::radius | ( | ) | const [inline] |
References radius_.
Referenced by ReadSwc::validate().
void SwcSegment::replaceKids | ( | const vector< int > & | kids | ) | [inline] |
References kids_.
Referenced by ReadSwc::cleanZeroLength().
void SwcSegment::setBad | ( | ) | [inline] |
References BadSegment, and type_.
Referenced by ReadSwc::cleanZeroLength().
void SwcSegment::setCumulativeDistance | ( | double | len, | |
double | L, | |||
double | pSoma, | |||
double | eSoma | |||
) | [inline] |
References electrotonicDistanceFromSoma_, L_, length_, and pathDistanceFromSoma_.
void SwcSegment::setGeometricalDistanceFromSoma | ( | const SwcSegment & | soma | ) | [inline] |
References Vec::distance(), geometricalDistanceFromSoma_, and v_.
void SwcSegment::setParent | ( | unsigned int | pa | ) | [inline] |
References parent_.
Referenced by ReadSwc::cleanZeroLength().
unsigned short SwcSegment::type | ( | ) | const [inline] |
References type_.
Referenced by ReadSwc::diagnostics().
const short SwcSegment::APICAL = 4 [static] |
Referenced by figureOutType().
const short SwcSegment::APICAL_END = 13 [static] |
Referenced by figureOutType().
const short SwcSegment::APICAL_FORK = 12 [static] |
Referenced by figureOutType().
const short SwcSegment::AXON = 2 [static] |
Referenced by figureOutType().
const short SwcSegment::AXON_END = 11 [static] |
Referenced by figureOutType().
const short SwcSegment::AXON_FORK = 10 [static] |
Referenced by figureOutType().
const short SwcSegment::BadSegment = 8 [static] |
const short SwcSegment::CUSTOM = 7 [static] |
Referenced by OK().
const short SwcSegment::DEND = 3 [static] |
Referenced by figureOutType().
double SwcSegment::electrotonicDistanceFromSoma_ [protected] |
electrotonic dist from soma, summed along dend.
Referenced by getElecDistFromSoma(), and setCumulativeDistance().
const short SwcSegment::END = 6 [static] |
Referenced by figureOutType().
const short SwcSegment::FORK = 5 [static] |
Referenced by figureOutType().
double SwcSegment::geometricalDistanceFromSoma_ [protected] |
geometrical distance from soma.
Referenced by getGeomDistFromSoma(), and setGeometricalDistanceFromSoma().
vector< int > SwcSegment::kids_ [protected] |
Referenced by addChild(), figureOutType(), kids(), and replaceKids().
double SwcSegment::L_ [protected] |
Length of segment.
Referenced by L(), and setCumulativeDistance().
double SwcSegment::length_ [protected] |
Radius of segment.
Referenced by length(), and setCumulativeDistance().
unsigned int SwcSegment::myIndex_ [protected] |
Referenced by myIndex().
unsigned int SwcSegment::parent_ [protected] |
Number of length constants in segment.
Referenced by parent(), setParent(), and SwcSegment().
double SwcSegment::pathDistanceFromSoma_ [protected] |
Index of parent. Is ~0 for soma.
dist from soma: not direct, but threaded along dend
Referenced by getPathDistFromSoma(), and setCumulativeDistance().
double SwcSegment::radius_ [protected] |
coordinates of end of segment
Referenced by radius().
const short SwcSegment::SOMA = 1 [static] |
Referenced by figureOutType().
short SwcSegment::type_ [protected] |
Index of self.
The type of the segment is supposedly as below for SWC files. Seems to be honored in the breach in actual files. 0 = undefined 1 = soma 2 = axon 3 = dendrite 4 = apical dendrite 5 = fork point 6 = end point 7 = custom
Referenced by figureOutType(), OK(), setBad(), and type().
const string SwcSegment::typeName [static] |
{ "undef", "soma", "axon", "dend", "apical", "dend_f", "dend_e", "custom", "bad", "undef", "axon_f", "axon_e", "apical_f", "apical_e" }
Referenced by ReadSwc::diagnostics().
const short SwcSegment::UNDEF = 0 [static] |
Referenced by OK().
Vec SwcSegment::v_ [protected] |
Referenced by distance(), setGeometricalDistanceFromSoma(), and vec().