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
detail
Definition: OpenCVUtil.cpp:127
armarx::armem::client::util::SimpleWriterBase::registerPropertyDefinitions
void registerPropertyDefinitions(armarx::PropertyDefinitionsPtr &def)
Definition: SimpleWriterBase.cpp:13
visionx::armem_images::client::ImageWriter
Definition: ImageWriter.h:60
visionx::armem_images::client::detail::RGBImageWriter::commitRGBImages
bool commitRGBImages(const std::vector< cv::Mat > &images, const armarx::core::time::DateTime &referenceTime)
Definition: ImageWriter.cpp:28
visionx::armem_images::client::detail::RGBImageWriter
Definition: ImageWriter.h:37
armarx::armem::client::util::SimpleWriterBase::connect
void connect(armarx::armem::client::MemoryNameSystem &mns)
Definition: SimpleWriterBase.cpp:33
visionx::armem_images::client::detail::RGBImageWriter::defaultProperties
Properties defaultProperties() const final
Definition: ImageWriter.cpp:93
armarx::armem::client::util::SimpleWriterBase
Definition: SimpleWriterBase.h:38
visionx::armem_images::client::detail::RGBImageWriter::RGBImageWriter
RGBImageWriter(const std::string &providerName)
Definition: ImageWriter.h:42
armarx::core::time::DateTime
Represents a point in time.
Definition: DateTime.h:24
std
Definition: Application.h:66
IceUtil::Handle< class PropertyDefinitionContainer >
visionx::armem_images::client
Definition: ImageReader.cpp:29
armarx::armem::client::MemoryNameSystem
The memory name system (MNS) client.
Definition: MemoryNameSystem.h:69
constants.h
SimpleWriterBase.h
visionx::armem_images::client::detail::RGBImageWriter::propertyPrefix
std::string propertyPrefix() const final
Definition: ImageWriter.cpp:87