MultiImageProvider.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::ArmarXObjects::MultiImageProvider
17 * @author Markus Grotz ( markus dot grotz 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
26#include <mutex>
27
29#include <VisionX/interface/components/Calibration.h>
30
31namespace armarx
32{
33
34 /**
35 * @class MultiImageProviderPropertyDefinitions
36 * @brief
37 */
47
48 /**
49 * @defgroup Component-MultiImageProvider MultiImageProvider
50 * @ingroup VisionX-Components
51 * A description of the component MultiImageProvider.
52 *
53 * @class MultiImageProvider
54 * @ingroup Component-MultiImageProvider
55 * @brief Brief description of class MultiImageProvider.
56 *
57 * Detailed description of class MultiImageProvider.
58 */
60 {
61 public:
62 /**
63 * @see armarx::ManagedIceObject::getDefaultName()
64 */
65 static std::string
67 {
68 return "MultiImageProvider";
69 }
70
71 std::string
72 getDefaultName() const override
73 {
74 return GetDefaultName();
75 }
76
77 protected:
78 /**
79 * @see visionx::ImageProcessor::onInitImageProcessor()
80 */
81 void onInitImageProcessor() override;
82
83 /**
84 * @see visionx::ImageProcessor::onConnectImageProcessor()
85 */
86 void onConnectImageProcessor() override;
87
88 /**
89 * @see visionx::ImageProcessor::onExitImageProcessor()
90 */
91 void onExitImageProcessor() override;
92
93 /**
94 * @see visionx::ImageProcessor::process()
95 */
96 void process() override;
97
98 /**
99 * @see PropertyUser::createPropertyDefinitions()
100 */
102
103
104 private:
105 std::mutex mutex;
106
107 struct ImageProviderData
108 {
109 int numImages = 0;
110 std::vector<visionx::CByteImageUPtr> srcCameraImages;
111 std::vector<visionx::CByteImageUPtr> targetCameraImages;
112 bool resize = false;
113 std::set<size_t> imageSelection;
114 visionx::ImageProviderInfo providerInfo;
115 };
116
117 size_t totalNumberOfImages = 0;
118 std::map<std::string, ImageProviderData> imageProviderData;
119 };
120} // namespace armarx
Brief description of class MultiImageProvider.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
static std::string GetDefaultName()
std::string getDefaultName() const override
Retrieve default name of component.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineRequiredProperty(const std::string &name, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
ImageProcessorPropertyDefinitions(std::string prefix)
The ImageProcessor class provides an interface for access to ImageProviders via Ice and shared memory...
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
ArmarX headers.