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 
27 #include <VisionX/interface/components/Calibration.h>
28 
29 
32 
33 #include <mutex>
34 
35 namespace armarx
36 {
37 
38  /**
39  * @class MultiImageProviderPropertyDefinitions
40  * @brief
41  */
44  {
45  public:
48  {
49  defineRequiredProperty<std::string>("ImageProviders", "Split names by ;");
50  }
51  };
52 
53  /**
54  * @defgroup Component-MultiImageProvider MultiImageProvider
55  * @ingroup VisionX-Components
56  * A description of the component MultiImageProvider.
57  *
58  * @class MultiImageProvider
59  * @ingroup Component-MultiImageProvider
60  * @brief Brief description of class MultiImageProvider.
61  *
62  * Detailed description of class MultiImageProvider.
63  */
65  virtual public visionx::ImageProcessor
66  {
67  public:
68  /**
69  * @see armarx::ManagedIceObject::getDefaultName()
70  */
71  std::string getDefaultName() const override
72  {
73  return "MultiImageProvider";
74  }
75 
76  protected:
77 
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  struct ImageProviderData
107  {
108  int numImages = 0;
109  std::vector<visionx::CByteImageUPtr> srcCameraImages;
110  std::vector<visionx::CByteImageUPtr> targetCameraImages;
111  bool resize = false;
112  std::set<size_t> imageSelection;
113  visionx::ImageProviderInfo providerInfo;
114  };
115  size_t totalNumberOfImages = 0;
116  std::map<std::string, ImageProviderData> imageProviderData;
117 
118 
119  };
120 }
121 
armarx::MultiImageProvider
Brief description of class MultiImageProvider.
Definition: MultiImageProvider.h:64
armarx::MultiImageProvider::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: MultiImageProvider.cpp:199
visionx
ArmarX headers.
Definition: OpenPoseStressTest.h:38
visionx::ImageProcessor
The ImageProcessor class provides an interface for access to ImageProviders via Ice and shared memory...
Definition: ImageProcessor.h:87
armarx::MultiImageProvider::getDefaultName
std::string getDefaultName() const override
Definition: MultiImageProvider.h:71
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:333
armarx::MultiImageProviderPropertyDefinitions
Definition: MultiImageProvider.h:42
visionx::ImageProcessorPropertyDefinitions::ImageProcessorPropertyDefinitions
ImageProcessorPropertyDefinitions(std::string prefix)
Definition: ImageProcessor.h:65
visionx::ImageProviderInfo
Definition: ImageProcessor.h:466
ImageProcessor.h
armarx::MultiImageProvider::onConnectImageProcessor
void onConnectImageProcessor() override
Definition: MultiImageProvider.cpp:66
armarx::MultiImageProvider::onExitImageProcessor
void onExitImageProcessor() override
Definition: MultiImageProvider.cpp:126
IceUtil::Handle< class PropertyDefinitionContainer >
visionx::ImageProcessorPropertyDefinitions
Definition: ImageProcessor.h:61
armarx::MultiImageProviderPropertyDefinitions::MultiImageProviderPropertyDefinitions
MultiImageProviderPropertyDefinitions(std::string prefix)
Definition: MultiImageProvider.h:46
armarx::MultiImageProvider::onInitImageProcessor
void onInitImageProcessor() override
Definition: MultiImageProvider.cpp:40
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::MultiImageProvider::process
void process() override
Definition: MultiImageProvider.cpp:146