Fraxinus  18.10
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  std::vector< Eigen::Vector3d > getBranchPositions(BranchPtr branchPtr, int startIndex);
33  double calculateRouteLength(std::vector< Eigen::Vector3d > route);
34 
35 private:
36  Eigen::MatrixXd mCLpoints;
37  BranchListPtr mBranchListPtr;
38  BranchPtr mProjectedBranchPtr;
39  int mProjectedIndex;
40  Vector3D mTargetPosition;
41  std::vector< Eigen::Vector3d > mRoutePositions;
42  std::vector< Eigen::Vector3d > mExtendedRoutePositions;
43  std::vector<BranchPtr> mSearchBranchPtrVector;
44  std::vector<int> mSearchIndexVector;
45  std::vector<Eigen::Vector3d> smoothBranch(BranchPtr branchPtr, int startIndex, Eigen::MatrixXd startPosition);
46 };
47 
48 double findDistanceToLine(Eigen::MatrixXd point, Eigen::MatrixXd line);
49 double findDistance(Eigen::MatrixXd p1, Eigen::MatrixXd p2);
50 
51 } /* namespace cx */
52 
53 #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 VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
boost::shared_ptr< class BranchList > BranchListPtr
vtkPolyDataPtr addVTKPoints(std::vector< Eigen::Vector3d > positions)
std::vector< Eigen::Vector3d > getBranchPositions(BranchPtr branchPtr, int startIndex)
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)
void addRouteInformationToFile(VisServicesPtr services)
double calculateRouteLength(std::vector< Eigen::Vector3d > route)
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
vtkPolyDataPtr findRouteToTarget(Vector3D targetCoordinate_r)
std::vector< Eigen::Matrix4d > M4Vector
Eigen::MatrixXd getCenterlinePositions(vtkPolyDataPtr centerline_r)
Namespace for all CustusX production code.