NorMIT-nav  22.09
An IGT application
cxAirwaysFromCenterline.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 
12 #ifndef CXAIRWAYSFROMCENTERLINE_H
13 #define CXAIRWAYSFROMCENTERLINE_H
14 
15 #include "cxMesh.h"
16 #include <QDomElement>
17 #include "org_custusx_filter_airwaysfromcenterline_Export.h"
18 
19 namespace cx
20 {
21 
22 typedef std::vector< Eigen::Matrix4d > M4Vector;
23 typedef boost::shared_ptr<class RouteToTarget> RouteToTargetPtr;
24 typedef boost::shared_ptr<class BranchList> BranchListPtr;
25 typedef boost::shared_ptr<class Branch> BranchPtr;
26 
27 
28 class org_custusx_filter_airwaysfromcenterline_EXPORT AirwaysFromCenterline
29 {
30 public:
32  virtual ~AirwaysFromCenterline();
33  void setTypeToBloodVessel(bool bloodVessel);
34  Eigen::MatrixXd getCenterlinePositions(vtkPolyDataPtr centerline_r);
35  void setBranches(BranchListPtr branches);
36  void setSegmentedVolume(vtkImageDataPtr segmentedVolume);
37  void processCenterline(vtkPolyDataPtr centerline_r);
38  BranchListPtr getBranchList();
39  vtkPolyDataPtr generateTubes(double staticRadius = 0, bool mergeWithOriginalAirways = false);
40  vtkImageDataPtr initializeEmptyAirwaysVolume();
41  vtkImageDataPtr initializeAirwaysVolumeFromOriginalSegmentation();
42  vtkImageDataPtr addSpheresAlongCenterlines(vtkImageDataPtr airwaysVolumePtr, double staticRadius = 0);
43  vtkImageDataPtr addSphereToImage(vtkImageDataPtr airwaysVolumePtr, double position[3], double radius);
44  void smoothAllBranchesForVB();
45  vtkPolyDataPtr addVTKPoints(std::vector< Eigen::Vector3d > positions);
46  vtkPolyDataPtr getVTKPoints();
47 
48 private:
49  Eigen::MatrixXd mCLpoints;
50  BranchListPtr mBranchListPtr;
51  vtkImageDataPtr mOriginalSegmentedVolume;
52  double mOrigin[3];
53  Vector3D mSpacing;
54  double mBounds[6];
55  Eigen::Array3i mDim;
56  double mAirwaysVolumeBoundaryExtention;
57  double mAirwaysVolumeBoundaryExtentionTracheaStart;
58  double mAirwaysVolumeSpacing;
59  bool mBloodVessel = false;
60  bool mMergeWithOriginalAirways = false;
61 
62 };
63 
64 std::pair<int, double> findDistanceToLine(Eigen::Vector3d point, Eigen::MatrixXd line);
65 double findDistance(Eigen::MatrixXd p1, Eigen::MatrixXd p2);
66 
67 typedef boost::shared_ptr<AirwaysFromCenterline> AirwaysFromCenterlinePtr;
68 
69 } /* namespace cx */
70 
71 #endif // CXAIRWAYSFROMCENTERLINE_H
cx::findDistanceToLine
std::pair< int, double > findDistanceToLine(Eigen::Vector3d point, Eigen::MatrixXd line)
Definition: cxAirwaysFromCenterline.cpp:356
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::findDistance
double findDistance(Eigen::MatrixXd p1, Eigen::MatrixXd p2)
Definition: cxBronchoscopePositionProjection.cpp:372
vtkImageDataPtr
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
Definition: cxVideoConnectionWidget.h:30
cx::RouteToTargetPtr
boost::shared_ptr< class RouteToTarget > RouteToTargetPtr
Definition: cxAccusurf.h:12
cx::AirwaysFromCenterline
Definition: cxAirwaysFromCenterline.h:28
cx::M4Vector
std::vector< Eigen::Matrix4d > M4Vector
Definition: cxBronchoscopePositionProjection.h:12
cx::vtkPolyDataPtr
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
Definition: cxCenterlineRegistration.h:42
cx::AirwaysFromCenterlinePtr
boost::shared_ptr< AirwaysFromCenterline > AirwaysFromCenterlinePtr
Definition: cxAirwaysFromCenterline.h:67
cx::BranchListPtr
boost::shared_ptr< class BranchList > BranchListPtr
Definition: cxBronchoscopePositionProjection.h:14
cx::BranchPtr
boost::shared_ptr< class Branch > BranchPtr
Definition: cxBronchoscopePositionProjection.h:15
cxMesh.h
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42