CustusX  2021.09.21-dev+develop.e3cd0
An IGT application
cxImageLandmarksWidget.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_landmarkExport.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 
45 class org_custusx_registration_method_landmark_EXPORT ImageLandmarksWidget: public LandmarkRegistrationWidget
46 {
47 Q_OBJECT
48 
49 public:
50 
51  ImageLandmarksWidget(RegServicesPtr services, QWidget* parent, QString objectName,
52  QString windowTitle, bool useRegistrationFixedPropertyInsteadOfActiveImage = false);
53  virtual ~ImageLandmarksWidget();
54 
55 protected slots:
56  void addLandmarkButtonClickedSlot();
57  virtual void editLandmarkButtonClickedSlot();
58  void removeLandmarkButtonClickedSlot();
59  void deleteLandmarksButtonClickedSlot();
60  void importPointMetricsToLandmarkButtonClickedSlot();
61  virtual void cellClickedSlot(int row, int column);
62  void enableButtons();
63  void onCurrentImageChanged();
64  void toggleDetailsSlot();
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* mDeleteLandmarksButton;
89  QAction* mDetailsAction;
90 
91 private:
93 
94  DataPtr getCurrentData() const;
95  void showOrHideDetails();
96  bool mUseRegistrationFixedPropertyInsteadOfActiveImage;
97  QString mLandmarksShowAdvancedSettingsString;
98 };
99 
103 }//namespace cx
104 
105 #endif /* CXLANDMARKIMAGEREGISTRATIONWIDGET_H_ */
QPushButton * mRemoveLandmarkButton
the Remove Landmark button
QPushButton * mEditLandmarkButton
the Edit Landmark button
QPushButton * mAddLandmarkButton
the Add Landmark button
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
boost::shared_ptr< class Data > DataPtr
boost::shared_ptr< class PickerRep > PickerRepPtr
ActiveToolProxyPtr mActiveToolProxy
boost::shared_ptr< class SelectDataStringPropertyBase > SelectDataStringPropertyBasePtr
QPushButton * mImportLandmarksFromPointMetricsButton
the Import Landmarks 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
SelectDataStringPropertyBasePtr mCurrentProperty
QPushButton * mDeleteLandmarksButton
the Delete Landmarks button
Namespace for all CustusX production code.