PrimitiveExtractionWidgetController.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package VisionX::gui-plugins::PrimitiveExtractionWidgetController
17  * @author Peter Kaiser ( peter dot kaiser at kit dot edu )
18  * @date 2016
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
25 #include <VisionX/gui-plugins/PrimitiveExtraction/ui_PrimitiveExtractionWidget.h>
27 
30 
32 
33 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
34 
35 #include <MemoryX/interface/components/WorkingMemoryInterface.h>
36 
37 #include <VisionX/interface/components/FakePointCloudProviderInterface.h>
38 #include <VisionX/interface/components/PointCloudSegmenter.h>
39 #include <VisionX/interface/components/PrimitiveMapper.h>
40 #include <VisionX/interface/components/AffordancePipelineVisualization.h>
41 
42 #include <QListWidgetItem>
43 
44 namespace armarx
45 {
46  /**
47  \page VisionX-GuiPlugins-PrimitiveExtraction PrimitiveExtraction
48  \brief The PrimitiveExtractionGui provides a convenient way for evaluating parameter
49  setups for the segmentation of point clouds into geometric primitives.
50 
51  API Documentation \ref PrimitiveExtractionWidgetController
52 
53  \see PrimitiveExtractionGuiPlugin
54  */
55 
56  /**
57  * \class PrimitiveExtractionWidgetController
58  * \brief PrimitiveExtractionWidgetController brief one line description
59  *
60  * Detailed description
61  */
64  public ArmarXComponentWidgetControllerTemplate<PrimitiveExtractionWidgetController>
65  {
66  Q_OBJECT
67 
68  public:
69  /**
70  * Controller Constructor
71  */
73 
74  /**
75  * Controller destructor
76  */
78 
79  /**
80  * @see ArmarXWidgetController::loadSettings()
81  */
82  void loadSettings(QSettings* settings) override;
83 
84  /**
85  * @see ArmarXWidgetController::saveSettings()
86  */
87  void saveSettings(QSettings* settings) override;
88 
89  QPointer<QDialog> getConfigDialog(QWidget* parent = 0) override;
90 
91  void configured() override;
92 
93  /**
94  * Returns the Widget name displayed in the ArmarXGui to create an
95  * instance of this class.
96  */
97  static QString GetWidgetName()
98  {
99  return "VisionX.PrimitiveExtractionConfig";
100  }
101 
102  /**
103  * \see armarx::Component::onInitComponent()
104  */
105  void onInitComponent() override;
106 
107  /**
108  * \see armarx::Component::onConnectComponent()
109  */
110  void onConnectComponent() override;
111  void onDisconnectComponent() override;
112 
113  public slots:
114  void loadPointCloud();
115  void run();
116  void setParameters();
117  void visualizationOptionsChanged();
118  void applyPointCloudTransformation();
119  void importConfig();
120  void exportConfig();
121  void applyAutoRotation();
122 
123  signals:
124  void providersChanged();
125 
126  private:
127  /**
128  * Widget Form
129  */
130  Ui::PrimitiveExtractionWidget widget;
131  QPointer<PrimitiveExtractionConfigDialog> configDialog;
132 
133  std::string pointCloudProviderName;
134  std::string pointCloudSegmenterName;
135  std::string primitiveExtractorName;
136  std::string pipelineVisualizationName;
137  std::string workingMemoryName;
138 
139  visionx::PointCloudProviderInterfacePrx pointCloudProvider;
140  visionx::PointCloudSegmenterInterfacePrx pointCloudSegmenter;
141  visionx::PrimitiveMapperInterfacePrx primitiveExtractor;
142  AffordancePipelineVisualizationInterfacePrx pipelineVisualization;
143  memoryx::WorkingMemoryInterfacePrx workingMemory;
144  DebugDrawerInterfacePrx debugDrawer;
145  };
146 }
147 
armarx::ArmarXComponentWidgetControllerTemplate
Definition: ArmarXComponentWidgetController.h:69
armarx::PrimitiveExtractionWidgetController::GetWidgetName
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
Definition: PrimitiveExtractionWidgetController.h:97
ArmarXGuiPlugin.h
ArmarXComponentWidgetController.h
ARMARXCOMPONENT_IMPORT_EXPORT
#define ARMARXCOMPONENT_IMPORT_EXPORT
Definition: ImportExportComponent.h:38
PrimitiveExtractionConfigDialog.h
armarx::PrimitiveExtractionWidgetController
PrimitiveExtractionWidgetController brief one line description.
Definition: PrimitiveExtractionWidgetController.h:62
IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface >
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
ImportExportComponent.h