CustusX  18.04-rc1
An IGT application
cxBranch.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 #ifndef BRANCH_H_
12 #define BRANCH_H_
13 
14 #include <vector>
15 #include "cxMesh.h"
16 #include "cxVector3D.h"
17 #include "org_custusx_registration_method_bronchoscopy_Export.h"
18 
19 typedef std::vector<double> dVector;
20 typedef std::vector<dVector> dVectors;
21 
22 
23 namespace cx
24 {
25 
26 class org_custusx_registration_method_bronchoscopy_EXPORT Branch;
27 typedef boost::shared_ptr<class Branch> BranchPtr;
28 typedef std::vector<BranchPtr> branchVector;
29 
30 class Branch
31 {
32  Eigen::MatrixXd mPositions;
33  Eigen::MatrixXd mOrientations;
34  branchVector mChildBranches;
35  BranchPtr mParentBranch;
36 public:
37  Branch();
38  virtual ~Branch();
39  void setPositions(Eigen::MatrixXd pos);
40  Eigen::MatrixXd getPositions();
41  void setOrientations(Eigen::MatrixXd orient);
42  Eigen::MatrixXd getOrientations();
43  void addChildBranch(BranchPtr child); //Note that this method doesn't set this branch as parent to the child. Inconsistent?
44  void setChildBranches(branchVector children); //Note that this method doesn't set this branch as parent to the children. Inconsistent?
45  void deleteChildBranches();
46  branchVector getChildBranches();
47  void setParentBranch(BranchPtr parent); //Note that this method doesn't set this branch as a child of the parent. Inconsistent?
49  double findBranchRadius();
50  BranchPtr getParentBranch();
51  int findParentIndex(branchVector bv) const;
52 };
53 
54 
55 }//namespace cx
56 
57 #endif /* BRANCH_H_ */
58 
59 
60 
void deleteChildBranches()
Definition: cxBranch.cpp:53
void addChildBranch(BranchPtr child)
Definition: cxBranch.cpp:43
void setPositions(Eigen::MatrixXd pos)
Definition: cxBranch.cpp:23
branchVector getChildBranches()
Definition: cxBranch.cpp:58
double findBranchRadius()
Definition: cxBranch.cpp:107
int findGenerationNumber()
Definition: cxBranch.cpp:93
boost::shared_ptr< class Branch > BranchPtr
Eigen::MatrixXd getOrientations()
Definition: cxBranch.cpp:38
virtual ~Branch()
Definition: cxBranch.cpp:126
int findParentIndex(branchVector bv) const
Branch::findParentIndex Given a vector of branches, find this branch&#39;s parent branch in that vector...
Definition: cxBranch.cpp:82
BranchPtr getParentBranch()
Definition: cxBranch.cpp:67
void setOrientations(Eigen::MatrixXd orient)
Definition: cxBranch.cpp:33
Eigen::MatrixXd getPositions()
Definition: cxBranch.cpp:28
std::vector< dVector > dVectors
Definition: cxBranch.h:20
std::vector< double > dVector
Definition: cxBranch.h:19
void setChildBranches(branchVector children)
Definition: cxBranch.cpp:48
void setParentBranch(BranchPtr parent)
Definition: cxBranch.cpp:63
std::vector< BranchPtr > branchVector
Definition: cxBranch.h:28
Namespace for all CustusX production code.