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 std::string
66 getDefaultName() const override
67 {
68 return "MultiImageProvider";
69 }
70
71 protected:
72 /**
73 * @see visionx::ImageProcessor::onInitImageProcessor()
74 */
75 void onInitImageProcessor() override;
76
77 /**
78 * @see visionx::ImageProcessor::onConnectImageProcessor()
79 */
80 void onConnectImageProcessor() override;
81
82 /**
83 * @see visionx::ImageProcessor::onExitImageProcessor()
84 */
85 void onExitImageProcessor() override;
86
87 /**
88 * @see visionx::ImageProcessor::process()
89 */
90 void process() override;
91
92 /**
93 * @see PropertyUser::createPropertyDefinitions()
94 */
96
97
98 private:
99 std::mutex mutex;
100
101 struct ImageProviderData
102 {
103 int numImages = 0;
104 std::vector<visionx::CByteImageUPtr> srcCameraImages;
105 std::vector<visionx::CByteImageUPtr> targetCameraImages;
106 bool resize = false;
107 std::set<size_t> imageSelection;
108 visionx::ImageProviderInfo providerInfo;
109 };
110
111 size_t totalNumberOfImages = 0;
112 std::map<std::string, ImageProviderData> imageProviderData;
113 };
114} // namespace armarx
Brief description of class MultiImageProvider.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
std::string getDefaultName() const override
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.