LVRLabelDialog.hpp
Go to the documentation of this file.
1 
34 #ifndef LVRLABELDIALOG_HPP_
35 #define LVRLABELDIALOG_HPP_
36 
37 #include "ui_LVRLabelDialogUI.h"
38 #include <QTreeWidget>
39 
43 #include <vtkPolyData.h>
44 #include <vtkSmartPointer.h>
45 
46 #include <boost/shared_array.hpp>
47 
48 #include <iostream>
49 
50 #define LABEL_NAME_COLUMN 0
51 #define LABELED_POINT_COLUMN 1
52 #define LABEL_VISIBLE_COLUMN 2
53 #define LABEL_ID_COLUMN 3
54 
55 using namespace std;
56 
57 namespace lvr2
58 {
59 
60 
61 class LVRLabelDialog : public QObject
62 {
63 
64  Q_OBJECT
65 public:
66 
67  LVRLabelDialog(QTreeWidget* parent);
68  virtual ~LVRLabelDialog();
69  void showEvent();
70  void setPoints(const std::string, const vtkSmartPointer<vtkPolyData> points);
71 
72 public Q_SLOTS:
73  void addNewLabel();
74  void addNewInstance();
75  void responseLabels(std::vector<uint16_t>);
76  void updatePointCount(uint16_t, int);
77  void cellSelected(QTreeWidgetItem*, int);
78  void comboBoxIndexChanged(int index);
79  void visibilityChanged(QTreeWidgetItem*, int);
80  void loadLabels();
81 
82 Q_SIGNALS:
83  void labelRemoved(QPair<int, QColor>);
84  void labelAdded(QTreeWidgetItem*);
85  void labelChanged(uint16_t);
86  void labelLoaded(int, std::vector<int>);
87  void hidePoints(int, bool);
88 
89 public:
90  Ui_LabelDialog* m_ui;
91  QDialog* m_dialog;
92 
93 private:
94  QTreeWidget* m_treeWidget;
97  int m_id_hack = 1;
98  std::map<std::string, vtkSmartPointer<vtkPolyData>> m_points;
99 };
100 
101 } /* namespace lvr2 */
102 
103 #endif /* LVRLABELDIALOG_HPP_ */
Ui_LabelDialog * m_ui
std::map< std::string, vtkSmartPointer< vtkPolyData > > m_points
QTreeWidget * m_treeWidget


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:08