#include <ReadSwc.h>
Public Member Functions | |
ReadSwc (const string &fname) | |
bool | validate () const |
void | assignKids () |
void | cleanZeroLength () |
void | parseBranches () |
void | traverseBranch (const SwcSegment &s, double &len, double &L, vector< int > &cable) const |
bool | build (Id parent, double lambda, double RM, double RA, double CM) |
void | diagnostics () const |
This class is used to read in SWC files as found in NeuroMorph.org and other places. Note that these are only passive models at this stage.
ReadSwc::ReadSwc | ( | const string & | fname | ) |
Each line is of the form n T x y z R P
void ReadSwc::assignKids | ( | ) |
References SwcSegment::myIndex(), and SwcSegment::parent().
bool ReadSwc::build | ( | Id | parent, | |
double | lambda, | |||
double | RM, | |||
double | RA, | |||
double | CM | |||
) |
References Shell::doAddMsg(), makeCompt(), SwcSegment::myIndex(), SwcSegment::parent(), and SwcBranch::segs_.
void ReadSwc::cleanZeroLength | ( | ) |
References SwcSegment::distance(), EPSILON, SwcSegment::kids(), SwcSegment::myIndex(), SwcSegment::parent(), SwcSegment::replaceKids(), SwcSegment::setBad(), and SwcSegment::setParent().
void ReadSwc::diagnostics | ( | ) | const |
void ReadSwc::parseBranches | ( | ) |
References SwcSegment::kids(), SwcSegment::OK(), and traverseBranch().
void ReadSwc::traverseBranch | ( | const SwcSegment & | s, | |
double & | len, | |||
double & | L, | |||
vector< int > & | cable | |||
) | const |
Referenced by parseBranches().
bool ReadSwc::validate | ( | ) | const |
References SwcSegment::myIndex(), SwcSegment::parent(), and SwcSegment::radius().