35 mOrientations = orient;
45 mChildBranches.push_back(child);
50 mChildBranches = children;
55 mChildBranches.clear();
60 return mChildBranches;
65 mParentBranch = parent;
84 for(
size_t i = 0; i < bv.size(); ++i)
86 if(bv[i] == mParentBranch)
87 return static_cast<int>(i);
95 int generationNumber = 1;
98 while (parentBranchPtr)
100 if (parentBranchPtr->getChildBranches().size() > 1)
101 generationNumber = generationNumber + 1;
103 parentBranchPtr = parentBranchPtr->getParentBranch();
105 if (generationNumber > 23)
109 return generationNumber;
116 if (generationNumber == 1)
118 if (generationNumber == 2)
120 if (generationNumber == 3)
122 if (generationNumber == 4)
124 if (generationNumber == 5)
void deleteChildBranches()
void addChildBranch(BranchPtr child)
void setPositions(Eigen::MatrixXd pos)
branchVector getChildBranches()
double findBranchRadius()
int findGenerationNumber()
boost::shared_ptr< class Branch > BranchPtr
Eigen::MatrixXd getOrientations()
int findParentIndex(branchVector bv) const
Branch::findParentIndex Given a vector of branches, find this branch's parent branch in that vector...
BranchPtr getParentBranch()
void setOrientations(Eigen::MatrixXd orient)
Eigen::MatrixXd getPositions()
void setChildBranches(branchVector children)
void setParentBranch(BranchPtr parent)
std::vector< BranchPtr > branchVector
Namespace for all CustusX production code.