Fraxinus  22.09
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  Eigen::VectorXd mRadius;
35  branchVector mChildBranches;
36  BranchPtr mParentBranch;
37  double mBronchoscopeRotation = 0;
38  QString mLap;
39 
40 public:
41  Branch();
42  virtual ~Branch();
43  void setPositions(Eigen::MatrixXd pos);
44  Eigen::MatrixXd getPositions();
45  void setOrientations(Eigen::MatrixXd orient);
46  Eigen::MatrixXd getOrientations();
47  void setRadius(Eigen::VectorXd r);
48  Eigen::VectorXd getRadius();
49  double getAverageRadius();
50  void addChildBranch(BranchPtr child); //Note that this method doesn't set this branch as parent to the child. Inconsistent?
51  void setChildBranches(branchVector children); //Note that this method doesn't set this branch as parent to the children. Inconsistent?
52  void deleteChildBranches();
53  branchVector getChildBranches();
54  void setParentBranch(BranchPtr parent); //Note that this method doesn't set this branch as a child of the parent. Inconsistent?
56  double findBranchRadius();
57  BranchPtr getParentBranch();
58  void calculateOrientations();
59  int findParentIndex(branchVector bv) const;
60  void setBronchoscopeRotation(double rotation);
61  double getBronchoscopeRotation();
62  void removeEqualPositions();
63  void setLap(QString lap);
64  QString getLap();
65 
66 };
67 
68 
69 }//namespace cx
70 
71 #endif /* BRANCH_H_ */
72 
73 
74 
void deleteChildBranches()
Definition: cxBranch.cpp:70
void addChildBranch(BranchPtr child)
Definition: cxBranch.cpp:60
void setPositions(Eigen::MatrixXd pos)
Definition: cxBranch.cpp:23
void setRadius(Eigen::VectorXd r)
Definition: cxBranch.cpp:45
branchVector getChildBranches()
Definition: cxBranch.cpp:75
double findBranchRadius()
Definition: cxBranch.cpp:139
int findGenerationNumber()
Definition: cxBranch.cpp:120
void removeEqualPositions()
Definition: cxBranch.cpp:167
double getAverageRadius()
Definition: cxBranch.cpp:55
boost::shared_ptr< class Branch > BranchPtr
Eigen::MatrixXd getOrientations()
Definition: cxBranch.cpp:40
virtual ~Branch()
Definition: cxBranch.cpp:202
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:109
BranchPtr getParentBranch()
Definition: cxBranch.cpp:84
void setOrientations(Eigen::MatrixXd orient)
Definition: cxBranch.cpp:35
QString getLap()
Definition: cxBranch.cpp:196
Eigen::VectorXd getRadius()
Definition: cxBranch.cpp:50
Eigen::MatrixXd getPositions()
Definition: cxBranch.cpp:30
std::vector< dVector > dVectors
Definition: cxBranch.h:20
void calculateOrientations()
Definition: cxBranch.cpp:89
void setLap(QString lap)
Definition: cxBranch.cpp:191
double getBronchoscopeRotation()
Definition: cxBranch.cpp:162
std::vector< double > dVector
Definition: cxBranch.h:19
void setBronchoscopeRotation(double rotation)
Definition: cxBranch.cpp:157
void setChildBranches(branchVector children)
Definition: cxBranch.cpp:65
void setParentBranch(BranchPtr parent)
Definition: cxBranch.cpp:80
std::vector< BranchPtr > branchVector
Definition: cxBranch.h:28
Namespace for all CustusX production code.