Fraxinus  17.12-rc4
An IGT application
cxRouteToTarget.h
Go to the documentation of this file.
1 #ifndef CXROUTETOTARGET_H
2 #define CXROUTETOTARGET_H
3 
4 #include "cxMesh.h"
5 #include <QDomElement>
6 
7 
8 namespace cx
9 {
10 
11 typedef std::vector< Eigen::Matrix4d > M4Vector;
12 typedef boost::shared_ptr<class RouteToTarget> RouteToTargetPtr;
13 typedef boost::shared_ptr<class BranchList> BranchListPtr;
14 typedef boost::shared_ptr<class Branch> BranchPtr;
15 
16 
18 {
19 public:
20  RouteToTarget();
21  virtual ~RouteToTarget();
22  //void setCenterline(vtkPolyDataPtr centerline);
23  Eigen::MatrixXd getCenterlinePositions(vtkPolyDataPtr centerline_r);
24  void processCenterline(vtkPolyDataPtr centerline_r);
25  void findClosestPointInBranches(Vector3D targetCoordinate_r);
26  void findRoutePositions();
27  void searchBranchUp(BranchPtr searchBranchPtr, int startIndex);
28  vtkPolyDataPtr findRouteToTarget(Vector3D targetCoordinate_r);
29  vtkPolyDataPtr findExtendedRoute(Vector3D targetCoordinate_r);
30  vtkPolyDataPtr addVTKPoints(std::vector< Eigen::Vector3d > positions);
31 
32 private:
33  Eigen::MatrixXd mCLpoints;
34  BranchListPtr mBranchListPtr;
35  BranchPtr mProjectedBranchPtr;
36  int mProjectedIndex;
37  std::vector< Eigen::Vector3d > mRoutePositions;
38  std::vector< Eigen::Vector3d > mExtendedRoutePositions;
39  std::vector<BranchPtr> mSearchBranchPtrVector;
40  std::vector<int> mSearchIndexVector;
41  std::vector<Eigen::Vector3d> smoothBranch(BranchPtr branchPtr, int startIndex, Eigen::MatrixXd startPosition);
42 };
43 
44 double findDistanceToLine(Eigen::MatrixXd point, Eigen::MatrixXd line);
45 double findDistance(Eigen::MatrixXd p1, Eigen::MatrixXd p2);
46 
47 } /* namespace cx */
48 
49 #endif // CXROUTETOTARGET_H
vtkPolyDataPtr findExtendedRoute(Vector3D targetCoordinate_r)
boost::shared_ptr< class RouteToTarget > RouteToTargetPtr
Definition: cxAccusurf.h:12
double findDistanceToLine(Eigen::MatrixXd point, Eigen::MatrixXd line)
boost::shared_ptr< class BranchList > BranchListPtr
vtkPolyDataPtr addVTKPoints(std::vector< Eigen::Vector3d > positions)
boost::shared_ptr< class Branch > BranchPtr
double findDistance(Eigen::MatrixXd p1, Eigen::MatrixXd p2)
void findClosestPointInBranches(Vector3D targetCoordinate_r)
void searchBranchUp(BranchPtr searchBranchPtr, int startIndex)
void processCenterline(vtkPolyDataPtr centerline_r)
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:63
vtkPolyDataPtr findRouteToTarget(Vector3D targetCoordinate_r)
std::vector< Eigen::Matrix4d > M4Vector
Eigen::MatrixXd getCenterlinePositions(vtkPolyDataPtr centerline_r)
Namespace for all CustusX production code.