1 #ifndef CXROUTETOTARGET_H 2 #define CXROUTETOTARGET_H 4 #include "org_custusx_filter_routetotarget_Export.h" 14 typedef std::vector< Eigen::Matrix4d >
M4Vector;
22 void setBloodVesselVolume(
ImagePtr bloodVesselVolume);
24 Eigen::MatrixXd getCenterlinePositions(
vtkPolyDataPtr centerline_r);
25 void setSmoothing(
bool smoothing);
26 void processCenterline(
MeshPtr mesh);
29 void processBloodVesselCenterline(Eigen::MatrixXd positions);
30 void findClosestPointInBranches(
Vector3D targetCoordinate_r);
31 void findClosestPointInBloodVesselBranches(
Vector3D targetCoordinate_r);
32 void findRoutePositions();
33 void findRoutePositionsInBloodVessels();
34 void searchBranchUp(
BranchPtr searchBranchPtr,
int startIndex);
35 void searchBloodVesselBranchUp(
BranchPtr searchBranchPtr,
int startIndex);
40 bool makeConnectedAirwayAndBloodVesselRoute();
42 vtkPolyDataPtr addVTKPoints(std::vector< Eigen::Vector3d > positions);
44 static double calculateRouteLength(std::vector< Eigen::Vector3d > route);
45 void setBloodVesselRadius();
46 double calculateBloodVesselRadius(Eigen::Vector3d position, Eigen::Vector3d orientation);
47 double findDistanceToSegmentationEdge(
vtkImageDataPtr bloodVesselImage, Eigen::Vector3i indexVector, Eigen::Vector3d perpendicularVector,
int* dim,
double* spacing,
int direction);
48 void makeMarianaCenterlineFile(QString filename);
49 QJsonArray makeMarianaCenterlineJSON();
50 std::vector< Eigen::Vector3d > getRoutePositions(
bool extendedRoute =
true);
51 std::vector< BranchPtr > getRouteBranches();
52 std::vector< double > getCameraRotation();
53 std::vector< int > getBranchingIndex();
55 double getTracheaLength();
56 static std::vector<Eigen::Vector3d> getRoutePositions(
MeshPtr route);
60 Eigen::MatrixXd mCLpoints;
61 bool mSmoothing =
true;
67 int mProjectedBloodVesselIndex;
70 std::vector< Eigen::Vector3d > mRoutePositions;
71 std::vector< Eigen::Vector3d > mExtendedRoutePositions;
72 std::vector<BranchPtr> mRoutePositionsBranch;
73 std::vector< double > mCameraRotation;
74 std::vector< double > mExtendedCameraRotation;
75 std::vector< Eigen::Vector3d > mBloodVesselRoutePositions;
76 std::vector< Eigen::Vector3d > mMergedAirwayAndBloodVesselRoutePositions;
77 std::vector< int > mBranchingIndex;
78 std::vector<int> mSearchIndexVector;
79 Eigen::MatrixXd mConnectedPointsInBVCL;
80 bool checkIfRouteToTargetEndsAtEndOfLastBranch();
81 bool mPathToBloodVesselsFound =
false;
85 std::pair< Eigen::MatrixXd, Eigen::MatrixXd >
findLocalPointsInCT(
int closestCLIndex , Eigen::MatrixXd CLpoints);
91 org_custusx_filter_routetotarget_EXPORT
double findDistance(Eigen::MatrixXd p1, Eigen::MatrixXd p2);
92 org_custusx_filter_routetotarget_EXPORT std::pair<int, double>
findDistanceFromPointToLine(Eigen::MatrixXd point, std::vector< Eigen::Vector3d > line);
96 #endif // CXROUTETOTARGET_H double findDistance(Eigen::MatrixXd p1, Eigen::MatrixXd p2)
boost::shared_ptr< class RouteToTarget > RouteToTargetPtr
boost::shared_ptr< class BranchList > BranchListPtr
boost::shared_ptr< class VisServices > VisServicesPtr
QJsonArray makeMarianaCenterlineOfFullBranchTreeJSON(BranchListPtr branchList)
boost::shared_ptr< class Image > ImagePtr
Eigen::MatrixXd convertToEigenMatrix(std::vector< Eigen::Vector3d > positionsVector)
boost::shared_ptr< class Branch > BranchPtr
std::pair< int, double > findDistanceFromPointToLine(Eigen::MatrixXd point, std::vector< Eigen::Vector3d > line)
Eigen::MatrixXd findClosestBloodVesselSegments(Eigen::MatrixXd bloodVesselPositions, Eigen::MatrixXd airwayPositions, Vector3D targetPosition)
double variance(Eigen::VectorXd X)
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
std::pair< Eigen::MatrixXd, Eigen::MatrixXd > findLocalPointsInCT(int closestCLIndex, Eigen::MatrixXd CLpositions)
std::vector< Eigen::Matrix4d > M4Vector
boost::shared_ptr< class Mesh > MeshPtr
std::vector< Eigen::Vector3d > getBranchPositions(BranchPtr branchPtr, int startIndex)
Namespace for all CustusX production code.
boost::shared_ptr< class PointMetric > PointMetricPtr