Fraxinus  18.10
An IGT application
cxBranchList.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 BRANCHLIST_H_
12 #define BRANCHLIST_H_
13 
14 #include "cxBranch.h"
15 #include "cxMesh.h"
16 #include "cxVector3D.h"
17 #include "org_custusx_registration_method_bronchoscopy_Export.h"
18 
19 
20 namespace cx
21 {
22 
23 typedef std::vector< Eigen::Matrix4d > M4Vector;
24 typedef boost::shared_ptr<class BranchList> BranchListPtr;
25 
26 class org_custusx_registration_method_bronchoscopy_EXPORT BranchList
27 {
28  std::vector<BranchPtr> mBranches;
29 public:
30  BranchList();
31  virtual ~BranchList();
32  void addBranch(BranchPtr b);
33  void deleteBranch(BranchPtr b);
34  void deleteAllBranches();
35  std::vector<BranchPtr> getBranches();
36  void findBranchesInCenterline(Eigen::MatrixXd positions_r);
37  void selectGenerations(int maxGeneration);
38  void calculateOrientations();
39  void smoothOrientations();
40  void interpolateBranchPositions(int interpolationFactor);
41  void smoothBranchPositions(int controlPointDistance);
42  BranchListPtr removePositionsForLocalRegistration(Eigen::MatrixXd trackingPositions, double maxDistance);
43  vtkPolyDataPtr createVtkPolyDataFromBranches(bool fullyConnected = false, bool straightBranches = false) const;
44 };
45 
46 std::pair<Eigen::MatrixXd,Eigen::MatrixXd > findConnectedPointsInCT(int startIndex , Eigen::MatrixXd positionsNotUsed);
47 Eigen::MatrixXd sortMatrix(int rowNumber, Eigen::MatrixXd matrix);
48 Eigen::MatrixXd eraseCol(int removeIndex, Eigen::MatrixXd positions);
49 std::pair<Eigen::MatrixXd::Index, double> dsearch(Eigen::Vector3d p, Eigen::MatrixXd positions);
50 std::pair<std::vector<Eigen::MatrixXd::Index>, Eigen::VectorXd > dsearchn(Eigen::MatrixXd p1, Eigen::MatrixXd p2);
51 
52 }//namespace cx
53 
54 #endif /* BRANCHLIST_H_ */
std::pair< Eigen::MatrixXd, Eigen::MatrixXd > findConnectedPointsInCT(int startIndex, Eigen::MatrixXd positionsNotUsed)
boost::shared_ptr< class BranchList > BranchListPtr
boost::shared_ptr< class Branch > BranchPtr
std::pair< Eigen::MatrixXd::Index, double > dsearch(Eigen::Vector3d p, Eigen::MatrixXd positions)
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
std::pair< std::vector< Eigen::MatrixXd::Index >, Eigen::VectorXd > dsearchn(Eigen::MatrixXd p1, Eigen::MatrixXd p2)
Eigen::MatrixXd eraseCol(int removeIndex, Eigen::MatrixXd positions)
Eigen::MatrixXd sortMatrix(int rowNumber, Eigen::MatrixXd matrix)
std::vector< Eigen::Matrix4d > M4Vector
Namespace for all CustusX production code.