CustusX  2023.01.05-dev+develop.0da12
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  virtual void pointSampled(Vector3D p_r);
66 
67 protected:
68  virtual void showEvent(QShowEvent* event);
69  virtual void hideEvent(QHideEvent* event);
70  virtual QString getTargetName() const;
71  virtual LandmarkMap getTargetLandmarks() const;
72  virtual void setTargetLandmark(QString uid, Vector3D p_target);
73  virtual void performRegistration() // no registration in this widget - only definition of pts.
74  {
75  }
76  virtual void prePaintEvent();
77  QString getLandmarkName(QString uid);
78  virtual Transform3D getTargetTransform() const;
79  PickerRepPtr getPickerRep();
80  void addLandmark(Vector3D p_r);
81  void resampleLandmark(Vector3D p_r);
82 
83  //gui
86 
87  QPushButton* mAddLandmarkButton;
88  QPushButton* mEditLandmarkButton;
89  QPushButton* mRemoveLandmarkButton;
90  QPushButton* mDeleteLandmarksButton;
92  QAction* mDetailsAction;
93 
94 private:
96 
97  DataPtr getCurrentData() const;
98  void showOrHideDetails();
99  bool mUseRegistrationFixedPropertyInsteadOfActiveImage;
100  QString mLandmarksShowAdvancedSettingsString;
101 };
102 
106 }//namespace cx
107 
108 #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.