CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxRouteToTargetFilterService.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 CXROUTETOTARGETFILTER_H
12 #define CXROUTETOTARGETFILTER_H
13 
14 #include "org_custusx_filter_routetotarget_Export.h"
15 #include "cxForwardDeclarations.h"
16 #include "cxPatientModelService.h"
17 #include "cxFilterImpl.h"
18 
19 class ctkPluginContext;
20 
21 namespace cx
22 {
23 
33 typedef boost::shared_ptr<class RouteToTarget> RouteToTargetPtr;
34 
35 class org_custusx_filter_routetotarget_EXPORT RouteToTargetFilter : public FilterImpl
36 {
37  Q_OBJECT
38  Q_INTERFACES(cx::Filter)
39 
40 public:
41  RouteToTargetFilter(VisServicesPtr services, bool createRouteInformationFile = false);
42  virtual ~RouteToTargetFilter() {}
43 
44  virtual QString getType() const;
45  virtual QString getName() const;
46  virtual QString getHelp() const;
47  static QString getNameSuffix();
48  static QString getNameSuffixExtension();
49  static QString getNameSuffixBloodVessel();
50  static QString getNameSuffixAirwayModel();
51  static QString getNameSuffixAirwayAndVesselRTT();
52 
53  std::vector< Eigen::Vector3d > getRoutePositions(bool extendedRoute = true);
54  std::vector<BranchPtr> getRouteBranches();
55  std::vector< double > getCameraRotation();
56  std::vector< int > getBranchingIndex();
57  BranchListPtr getBranchList();
58  void setBranchList(BranchListPtr branchList);
59  void setReprocessCenterline(bool reprocess);
60 
61  virtual bool execute();
62  virtual bool postProcess();
63  virtual bool postProcessBloodVessels();
64  void setSmoothing(bool smoothing = true);
65 
66 protected:
67  virtual void createOptions();
68  virtual void createInputTypes();
69  virtual void createOutputTypes();
70 
71 private slots:
72 
73 private:
74  RouteToTargetPtr mRouteToTarget;
75  vtkPolyDataPtr mOutput;
76  vtkPolyDataPtr mExtendedRoute;
77  vtkPolyDataPtr mBloodVesselRoute;
78  vtkPolyDataPtr mAirwaysFromBloodVessel;
79  vtkPolyDataPtr mAirwayAndBloodVesselRoute;
80  BranchListPtr mBranchListPtr;
81  bool mGenerateFileWithRouteInformation;
82  bool mSmoothing;
83  bool mReprocessCenterline = true;
84  BoolPropertyPtr getBloodVesselOption(QDomElement root);
85 };
86 typedef boost::shared_ptr<class RouteToTargetFilter> RouteToTargetFilterPtr;
87 
88 
89 } // namespace cx
90 
91 
92 
93 #endif // CXROUTETOTARGETFILTER_H
boost::shared_ptr< class RouteToTargetFilter > RouteToTargetFilterPtr
boost::shared_ptr< class RouteToTarget > RouteToTargetPtr
Definition: cxAccusurf.h:12
boost::shared_ptr< class BranchList > BranchListPtr
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
boost::shared_ptr< class BoolProperty > BoolPropertyPtr
Namespace for all CustusX production code.