NorMIT-nav  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_ */
cx::LandmarkRegistrationWidget
Definition: cxLandmarkRegistrationWidget.h:45
cx::ImageLandmarksWidget::mEditLandmarkButton
QPushButton * mEditLandmarkButton
the Edit Landmark button
Definition: cxImageLandmarksWidget.h:88
cx::ImageLandmarksWidget
Definition: cxImageLandmarksWidget.h:45
cx::ImageLandmarksWidget::mRemoveLandmarkButton
QPushButton * mRemoveLandmarkButton
the Remove Landmark button
Definition: cxImageLandmarksWidget.h:89
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::ImageLandmarksWidget::mCurrentProperty
SelectDataStringPropertyBasePtr mCurrentProperty
Definition: cxImageLandmarksWidget.h:84
cx::LandmarkMap
std::map< QString, class Landmark > LandmarkMap
Definition: cxLandmarkRegistrationWidget.h:31
cx::ActiveToolProxyPtr
boost::shared_ptr< class ActiveToolProxy > ActiveToolProxyPtr
Definition: cxStatusBar.h:32
cx::ImageLandmarksWidget::mAddLandmarkButton
QPushButton * mAddLandmarkButton
the Add Landmark button
Definition: cxImageLandmarksWidget.h:87
cx::ImageLandmarksWidget::mDetailsAction
QAction * mDetailsAction
Definition: cxImageLandmarksWidget.h:92
cx::ImageLandmarksWidget::mDeleteLandmarksButton
QPushButton * mDeleteLandmarksButton
the Delete Landmarks button
Definition: cxImageLandmarksWidget.h:90
cx::Transform3D
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Definition: cxLandmarkPatientRegistrationWidget.h:33
cx::DataPtr
boost::shared_ptr< class Data > DataPtr
Definition: cxRegistrationApplicator.h:22
cx::ImageLandmarksWidget::mImportLandmarksFromPointMetricsButton
QPushButton * mImportLandmarksFromPointMetricsButton
the Import Landmarks button
Definition: cxImageLandmarksWidget.h:91
cx::ImageLandmarksWidget::mActiveToolProxy
ActiveToolProxyPtr mActiveToolProxy
Definition: cxImageLandmarksWidget.h:85
cx::RegServicesPtr
boost::shared_ptr< class RegServices > RegServicesPtr
Definition: cxRegServices.h:20
cxRegistrationProperties.h
cx::PickerRepPtr
boost::shared_ptr< class PickerRep > PickerRepPtr
Definition: cxForwardDeclarations.h:83
cxActiveToolProxy.h
cxLandmarkRegistrationWidget.h
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
cx::ImageLandmarksWidget::performRegistration
virtual void performRegistration()
Definition: cxImageLandmarksWidget.h:73
cx::SelectDataStringPropertyBasePtr
boost::shared_ptr< class SelectDataStringPropertyBase > SelectDataStringPropertyBasePtr
Definition: cxMeshGlyphsWidget.h:26