Fraxinus  18.10
An IGT application
cxCenterlinePointsWidget.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 CXLANDMARKIMAGEREGISTRATIONWIDGET_H_
13 #define CXLANDMARKIMAGEREGISTRATIONWIDGET_H_
14 
15 #include "org_custusx_registration_method_centerline_Export.h"
16 
19 #include "cxActiveToolProxy.h"
20 
21 class QVBoxLayout;
22 class QComboBox;
23 class QTableWidget;
24 class QPushButton;
25 class QLabel;
26 class QSlider;
27 
28 namespace cx
29 {
30 
37 //TODO: Refactor this class to use ImageLandmarksWidget instead of duplicating code
46 class org_custusx_registration_method_centerline_EXPORT CenterlinePointsWidget: public LandmarkRegistrationWidget
47 {
48 Q_OBJECT
49 
50 public:
51 
52  CenterlinePointsWidget(RegServicesPtr services, QWidget* parent, QString objectName,
53  QString windowTitle, bool useRegistrationFixedPropertyInsteadOfActiveImage = false);
54  virtual ~CenterlinePointsWidget();
55 
56 protected slots:
57 // virtual void activeImageChangedSlot(); ///< listens to the datamanager for when the active image is changed
58  void addLandmarkButtonClickedSlot();
59  virtual void editLandmarkButtonClickedSlot();
60  void removeLandmarkButtonClickedSlot();
61  void createCenterlineButtonClickedSlot();
62  virtual void cellClickedSlot(int row, int column);
63  void enableButtons();
64  void onCurrentImageChanged();
65 
66 protected:
67  virtual void showEvent(QShowEvent* event);
68  virtual void hideEvent(QHideEvent* event);
69  virtual QString getTargetName() const;
70  virtual LandmarkMap getTargetLandmarks() const;
71  virtual void setTargetLandmark(QString uid, Vector3D p_target);
72  virtual void performRegistration() // no registration in this widget - only definition of pts.
73  {
74  }
75  virtual void prePaintEvent();
76  QString getLandmarkName(QString uid);
77  virtual Transform3D getTargetTransform() const;
78  PickerRepPtr getPickerRep();
79 
80  //gui
83 
84  QPushButton* mAddLandmarkButton;
85  QPushButton* mEditLandmarkButton;
86  QPushButton* mRemoveLandmarkButton;
87  QPushButton* mCreateCenterlineButton;
88 
89 private:
91 
92  DataPtr getCurrentData() const;
93  bool mUseRegistrationFixedPropertyInsteadOfActiveImage;
94 };
95 
99 }//namespace cx
100 
101 #endif /* CXLANDMARKIMAGEREGISTRATIONWIDGET_H_ */
QPushButton * mEditLandmarkButton
the Edit Landmark button
QPushButton * mRemoveLandmarkButton
the Remove Landmark button
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
SelectDataStringPropertyBasePtr mCurrentProperty
boost::shared_ptr< class Data > DataPtr
boost::shared_ptr< class PickerRep > PickerRepPtr
boost::shared_ptr< class SelectDataStringPropertyBase > SelectDataStringPropertyBasePtr
QPushButton * mAddLandmarkButton
the Add Landmark button
boost::shared_ptr< class RegServices > RegServicesPtr
Definition: cxRegServices.h:20
boost::shared_ptr< class ActiveToolProxy > ActiveToolProxyPtr
Definition: cxStatusBar.h:32
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
std::map< QString, class Landmark > LandmarkMap
Widget for creating a centerline.vtk file from image landmarks.
QPushButton * mCreateCenterlineButton
the Create centerline button
Namespace for all CustusX production code.