ImageWriter.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::armem_images
17 * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
18 * @date 2021
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
26
27#include <VisionX/libraries/armem/vision/images/core/aron/ImageDepth.aron.generated.h>
28#include <VisionX/libraries/armem/vision/images/core/aron/ImageRGB.aron.generated.h>
30
31#include <Image/ByteImage.h>
32
34{
35 namespace detail
36 {
38 {
39 public:
41
42 RGBImageWriter(const std::string& providerName) : providerName(providerName){};
43
44
45 bool commitRGBImages(const std::vector<cv::Mat>& images,
46 const armarx::core::time::DateTime& referenceTime);
47
48 bool commitRGBImages(const std::vector<CByteImage>& images,
49 const armarx::core::time::DateTime& referenceTime);
50
51 protected:
52 std::string propertyPrefix() const final;
53 Properties defaultProperties() const final;
54
55 private:
56 const std::string providerName;
57 };
58 } // namespace detail
59
61 {
62 public:
63 ImageWriter(const std::string& providerName);
64
67
68 bool commitRGBImages(const std::vector<cv::Mat>& images,
69 const armarx::core::time::DateTime& referenceTime);
70
71 bool commitRGBImages(const std::vector<CByteImage>& images,
72 const armarx::core::time::DateTime& referenceTime);
73
74 private:
75 detail::RGBImageWriter rgbWriter;
76 };
77} // namespace visionx::armem_images::client
The memory name system (MNS) client.
void connect(armarx::armem::client::MemoryNameSystem &mns)
void registerPropertyDefinitions(armarx::PropertyDefinitionsPtr &def)
Represents a point in time.
Definition DateTime.h:25
ImageWriter(const std::string &providerName)
RGBImageWriter(const std::string &providerName)
Definition ImageWriter.h:42
bool commitRGBImages(const std::vector< cv::Mat > &images, const armarx::core::time::DateTime &referenceTime)
armarx::armem::client::util::SimpleWriterBase Base
Definition ImageWriter.h:40
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.