UserAssistedSegmenter.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 SceneUnderstanding::ArmarXObjects::UserAssistedSegmenter
17  * @author Rainer Kartmann ( rainer dot kartmann at student dot kit dot edu )
18  * @date 2018
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
27 
29 #include <VisionX/interface/components/UserAssistedSegmenter.h>
30 
31 
32 namespace visionx
33 {
34  /// UserAssistedSegmenterPropertyDefinitions
37  {
38  public:
40  };
41 
42 
43  /**
44  * @defgroup Component-UserAssistedSegmenter UserAssistedSegmenter
45  * @ingroup VisionX-Components
46  *
47  * UserAssistedSegmenter is used to manually group segments of an over-
48  * segmentation (e.g. LCCP, Region-Growing) to new segments.
49  *
50  *
51  * @class UserAssistedSegmenter
52  * @ingroup Component-UserAssistedSegmenter
53  * @brief Brief description of class UserAssistedSegmenter.
54  *
55  * Detailed description of class UserAssistedSegmenter.
56  */
58  virtual public visionx::PointCloudProcessor,
59  virtual public visionx::UserAssistedSegmenterInterface
60  {
61  using PointL = pcl::PointXYZRGBL;
62  using PointCloudL = pcl::PointCloud<PointL>;
63  using PointCloudLPtr = PointCloudL::Ptr;
64 
65 
66  public:
67 
68  /// @see armarx::ManagedIceObject::getDefaultName()
69  virtual std::string getDefaultName() const override;
70 
71  // UserAssistedSegmenterInterface interface
72  virtual void publishSegmentation(const visionx::ColoredLabeledPointCloud& pointCloud,
73  const Ice::Current& = Ice::emptyCurrent) override;
74 
76 
77 
78  protected:
79 
80  /// @see visionx::PointCloudProcessor::onInitPointCloudProcessor()
81  virtual void onInitPointCloudProcessor() override;
82 
83  /// @see visionx::PointCloudProcessor::onConnectPointCloudProcessor()
84  virtual void onConnectPointCloudProcessor() override;
85 
86  /// @see visionx::PointCloudProcessor::onDisconnectPointCloudProcessor()
87  virtual void onDisconnectPointCloudProcessor() override;
88 
89  /// @see visionx::PointCloudProcessor::onExitPointCloudProcessor()
90  virtual void onExitPointCloudProcessor() override;
91 
92  /// @see visionx::PointCloudProcessor::process()
93  virtual void process() override;
94 
95 
96  private:
97 
98  std::string resultPointCloudName;
99 
100  float publishFrequency;
101 
102  visionx::UserAssistedSegmenterListenerPrx updatesListener;
103 
104  PointCloudLPtr resultPointCloud;
105 
107 
108 
109  protected:
110 
111  /// @see PropertyUser::createPropertyDefinitions()
113 
114  };
115 }
116 
visionx
ArmarX headers.
Definition: OpenPoseStressTest.h:38
visionx::UserAssistedSegmenter::publishSegmentation
virtual void publishSegmentation(const visionx::ColoredLabeledPointCloud &pointCloud, const Ice::Current &=Ice::emptyCurrent) override
Definition: UserAssistedSegmenter.cpp:122
visionx::UserAssistedSegmenter::onConnectPointCloudProcessor
virtual void onConnectPointCloudProcessor() override
Definition: UserAssistedSegmenter.cpp:72
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:333
PeriodicTask.h
visionx::UserAssistedSegmenter::onDisconnectPointCloudProcessor
virtual void onDisconnectPointCloudProcessor() override
Definition: UserAssistedSegmenter.cpp:87
visionx::UserAssistedSegmenter::process
virtual void process() override
Definition: UserAssistedSegmenter.cpp:99
visionx::PointCloudProcessor
The PointCloudProcessor class provides an interface for access to PointCloudProviders via Ice and sha...
Definition: PointCloudProcessor.h:186
visionx::PointCloudProcessorPropertyDefinitions
Properties of PointCloudProcessor.
Definition: PointCloudProcessor.h:173
PointCloudProcessor.h
visionx::UserAssistedSegmenterPropertyDefinitions
UserAssistedSegmenterPropertyDefinitions.
Definition: UserAssistedSegmenter.h:35
Component.h
visionx::UserAssistedSegmenter::onExitPointCloudProcessor
virtual void onExitPointCloudProcessor() override
Definition: UserAssistedSegmenter.cpp:95
visionx::UserAssistedSegmenter
Brief description of class UserAssistedSegmenter.
Definition: UserAssistedSegmenter.h:57
IceUtil::Handle
Definition: forward_declarations.h:29
visionx::UserAssistedSegmenterPropertyDefinitions::UserAssistedSegmenterPropertyDefinitions
UserAssistedSegmenterPropertyDefinitions(std::string prefix)
Definition: UserAssistedSegmenter.cpp:31
visionx::UserAssistedSegmenter::createPropertyDefinitions
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: UserAssistedSegmenter.cpp:148
visionx::UserAssistedSegmenter::provideResultPointCloud
void provideResultPointCloud()
Definition: UserAssistedSegmenter.cpp:140
visionx::UserAssistedSegmenter::getDefaultName
virtual std::string getDefaultName() const override
Definition: UserAssistedSegmenter.cpp:56
visionx::UserAssistedSegmenter::onInitPointCloudProcessor
virtual void onInitPointCloudProcessor() override
Definition: UserAssistedSegmenter.cpp:62