NorMIT-nav  22.09
An IGT application
cxBronchoscopyRegistration.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 BRONCHOSCOPYREGISTRATION_H_
12 #define BRONCHOSCOPYREGISTRATION_H_
13 
14 #include "org_custusx_registration_method_bronchoscopy_Export.h"
15 #include "cxBranchList.h"
16 #include <vector>
17 #include "vtkForwardDeclarations.h"
18 
19 typedef std::vector< Eigen::Matrix4d > M4Vector;
20 
21 
22 namespace cx
23 {
24 
25 typedef std::map<double, Transform3D> TimedTransformMap;
26 typedef boost::shared_ptr<class BranchList> BranchListPtr;
27 
28 class org_custusx_registration_method_bronchoscopy_EXPORT BronchoscopyRegistration
29 {
30  BranchListPtr mBranchListPtr;
31  bool mCenterlineProcessed;
32 
33 public:
35  vtkPolyDataPtr processCenterline(vtkPolyDataPtr centerline, Transform3D rMd, int numberOfGenerations = 0);
36  void setBranchList(BranchListPtr branchList, int numberOfGenerations = 0);
37  BranchListPtr getBranchList();
38  BranchListPtr processCenterlineImage2Image(vtkPolyDataPtr centerline, int numberOfGenerations = 0);
39  Eigen::Matrix4d runBronchoscopyRegistration(TimedTransformMap trackingData_prMt, Transform3D old_rMpr, double maxDistanceForLocalRegistration);
40  Eigen::Matrix4d runBronchoscopyRegistrationImage2Image(vtkPolyDataPtr centerlineFixed, vtkPolyDataPtr centerlineMoving);
41  bool isCenterlineProcessed();
42  virtual ~BronchoscopyRegistration();
43 };
44 
46 Eigen::Matrix4d registrationAlgorithm(BranchListPtr branches, M4Vector Tnavigation);
47 Eigen::Matrix4d registrationAlgorithmImage2Image(BranchListPtr branchesFixed, BranchListPtr branchesMoving);
48 std::vector<Eigen::MatrixXd::Index> dsearch2n(Eigen::MatrixXd pos1, Eigen::MatrixXd pos2, Eigen::MatrixXd ori1, Eigen::MatrixXd ori2);
49 vtkPointsPtr convertTovtkPoints(Eigen::MatrixXd positions);
50 Eigen::Matrix4d performLandmarkRegistration(vtkPointsPtr source, vtkPointsPtr target, bool* ok);
51 std::pair<Eigen::MatrixXd , Eigen::MatrixXd> RemoveInvalidData(Eigen::MatrixXd positionData, Eigen::MatrixXd orientationData);
53 org_custusx_registration_method_bronchoscopy_EXPORT Eigen::MatrixXd makeTransformedMatrix(vtkPolyDataPtr linesPolyData, Transform3D rMd = Transform3D::Identity());
54 
55 }//namespace cx
56 
57 #endif /* BRONCHOSCOPYREGISTRATION_H_ */
cx::excludeClosePositions
M4Vector excludeClosePositions(M4Vector Tnavigation)
Definition: cxBronchoscopyRegistration.cpp:35
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::RemoveInvalidData
std::pair< Eigen::MatrixXd, Eigen::MatrixXd > RemoveInvalidData(Eigen::MatrixXd positionData, Eigen::MatrixXd orientationData)
Definition: cxBronchoscopyRegistration.cpp:218
cx::performLandmarkRegistration
Eigen::Matrix4d performLandmarkRegistration(vtkPointsPtr source, vtkPointsPtr target)
Definition: cxBronchoscopyRegistration.cpp:133
cx::BronchoscopyRegistration
Definition: cxBronchoscopyRegistration.h:28
M4Vector
std::vector< Eigen::Matrix4d > M4Vector
Definition: cxBronchoscopyRegistration.h:19
cxBranchList.h
cx::registrationAlgorithm
Eigen::Matrix4d registrationAlgorithm(BranchListPtr branches, M4Vector Tnavigation, Transform3D old_rMpr)
Definition: cxBronchoscopyRegistration.cpp:269
cx::Transform3D
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Definition: cxLandmarkPatientRegistrationWidget.h:33
cx::M4Vector
std::vector< Eigen::Matrix4d > M4Vector
Definition: cxBronchoscopePositionProjection.h:12
cx::TimedTransformMap
std::map< double, Transform3D > TimedTransformMap
Definition: cxRecordSession.h:36
cx::vtkPointsPtr
vtkSmartPointer< vtkPoints > vtkPointsPtr
Definition: cxCenterlineRegistration.h:41
cx::dsearch2n
std::vector< Eigen::MatrixXd::Index > dsearch2n(Eigen::MatrixXd pos1, Eigen::MatrixXd pos2, Eigen::MatrixXd ori1, Eigen::MatrixXd ori2)
Definition: cxBronchoscopyRegistration.cpp:174
vtkForwardDeclarations.h
cx::vtkPolyDataPtr
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
Definition: cxCenterlineRegistration.h:42
cx::BranchListPtr
boost::shared_ptr< class BranchList > BranchListPtr
Definition: cxBronchoscopePositionProjection.h:14
cx::convertTovtkPoints
vtkPointsPtr convertTovtkPoints(Eigen::MatrixXd positions)
Definition: cxBronchoscopyRegistration.cpp:119
cx::registrationAlgorithmImage2Image
Eigen::Matrix4d registrationAlgorithmImage2Image(BranchListPtr branchesFixed, BranchListPtr branchesMoving)
Definition: cxBronchoscopyRegistration.cpp:388
cx::makeTransformedMatrix
Eigen::MatrixXd makeTransformedMatrix(vtkPolyDataPtr linesPolyData, Transform3D rMd)
makeTransformedMatrix This method takes an vtkpolydata as input, runs it through a transform and retu...
Definition: cxBronchoscopyRegistration.cpp:669