NorMIT-nav  2023.01.05-dev+develop.0da12
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 "cxForwardDeclarations.h"
16 #include "cxMesh.h"
17 #include "cxVector3D.h"
18 #include "org_custusx_registration_method_bronchoscopy_Export.h"
19 
20 typedef std::vector<double> dVector;
21 typedef std::vector<dVector> dVectors;
22 
23 
24 namespace cx
25 {
26 
27 class org_custusx_registration_method_bronchoscopy_EXPORT Branch;
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  Vector3D mBendingDirection;
38  double mBronchoscopeRotation = 0;
39  QString mLap;
40 
41 public:
42  Branch();
43  virtual ~Branch();
44  void setPositions(Eigen::MatrixXd pos);
45  Eigen::MatrixXd getPositions();
46  void setOrientations(Eigen::MatrixXd orient);
47  Eigen::MatrixXd getOrientations();
48  void setRadius(Eigen::VectorXd r);
49  Eigen::VectorXd getRadius();
50  double getAverageRadius();
51  void addChildBranch(BranchPtr child); //Note that this method doesn't set this branch as parent to the child. Inconsistent?
52  void setChildBranches(branchVector children); //Note that this method doesn't set this branch as parent to the children. Inconsistent?
53  void deleteChildBranches();
55  void setParentBranch(BranchPtr parent); //Note that this method doesn't set this branch as a child of the parent. Inconsistent?
57  double findBranchRadius();
59  void calculateOrientations();
60  int findParentIndex(branchVector bv) const;
61  void setBronchoscopeBendingDirection(Vector3D bendingDirection);
63  void setBronchoscopeRotation(double rotation);
64  double getBronchoscopeRotation();
65  void removeEqualPositions();
66  void setLap(QString lap);
67  QString getLap();
68 
69 };
70 
71 
72 }//namespace cx
73 
74 #endif /* BRANCH_H_ */
75 
76 
77 
cx::Branch::calculateOrientations
void calculateOrientations()
Definition: cxBranch.cpp:89
cx::Branch::getOrientations
Eigen::MatrixXd getOrientations()
Definition: cxBranch.cpp:40
cx::Branch::setRadius
void setRadius(Eigen::VectorXd r)
Definition: cxBranch.cpp:45
cx::Branch::setPositions
void setPositions(Eigen::MatrixXd pos)
Definition: cxBranch.cpp:23
cx::Branch::getParentBranch
BranchPtr getParentBranch()
Definition: cxBranch.cpp:84
cx::Branch::addChildBranch
void addChildBranch(BranchPtr child)
Definition: cxBranch.cpp:60
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxForwardDeclarations.h
cx::Branch::getBronchoscopeBendingDirection
Vector3D getBronchoscopeBendingDirection()
Definition: cxBranch.cpp:163
cx::Branch::getAverageRadius
double getAverageRadius()
Definition: cxBranch.cpp:55
cx::Branch::Branch
Branch()
Definition: cxBranch.cpp:16
cx::Branch::deleteChildBranches
void deleteChildBranches()
Definition: cxBranch.cpp:70
cx::Branch::setBronchoscopeRotation
void setBronchoscopeRotation(double rotation)
Definition: cxBranch.cpp:168
cxVector3D.h
cx::Branch::removeEqualPositions
void removeEqualPositions()
Definition: cxBranch.cpp:178
cx::Branch::setParentBranch
void setParentBranch(BranchPtr parent)
Definition: cxBranch.cpp:80
cx::BranchPtr
boost::shared_ptr< class Branch > BranchPtr
Definition: cxForwardDeclarations.h:150
cx::Branch::findGenerationNumber
int findGenerationNumber()
Definition: cxBranch.cpp:120
cx::Branch::getLap
QString getLap()
Definition: cxBranch.cpp:207
dVectors
std::vector< dVector > dVectors
Definition: cxBranch.h:21
cx::Branch::setLap
void setLap(QString lap)
Definition: cxBranch.cpp:202
cx::Branch
Definition: cxBranch.h:30
dVector
std::vector< double > dVector
Definition: cxBranch.h:20
cx::Branch::getChildBranches
branchVector getChildBranches()
Definition: cxBranch.cpp:75
cx::Branch::setOrientations
void setOrientations(Eigen::MatrixXd orient)
Definition: cxBranch.cpp:35
cx::branchVector
std::vector< BranchPtr > branchVector
Definition: cxBranch.h:28
cx::Branch::getPositions
Eigen::MatrixXd getPositions()
Definition: cxBranch.cpp:30
cx::Branch::setBronchoscopeBendingDirection
void setBronchoscopeBendingDirection(Vector3D bendingDirection)
Definition: cxBranch.cpp:158
cx::Branch::setChildBranches
void setChildBranches(branchVector children)
Definition: cxBranch.cpp:65
cx::Branch::findBranchRadius
double findBranchRadius()
Definition: cxBranch.cpp:139
cx::Branch::getRadius
Eigen::VectorXd getRadius()
Definition: cxBranch.cpp:50
cx::Branch::getBronchoscopeRotation
double getBronchoscopeRotation()
Definition: cxBranch.cpp:173
cxMesh.h
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
cx::Branch::~Branch
virtual ~Branch()
Definition: cxBranch.cpp:213
cx::Branch::findParentIndex
int findParentIndex(branchVector bv) const
Branch::findParentIndex Given a vector of branches, find this branch's parent branch in that vector....
Definition: cxBranch.cpp:109