Image Component Library (ICL)
PointCloudSerializer.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLGeom/src/ICLGeom/PointCloudSerializer.h **
10 ** Module : ICLGeom **
11 ** Authors: Christof Elbrechter **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 
31 #pragma once
32 
35 
36 #include <map>
37 
38 namespace icl{
39 
40  namespace geom{
41 
44 
46  struct MandatoryInfo{
47  int width;
48  int height;
49  bool organized;
51  bool padding[15];
52  };
53 
55  virtual void initializeSerialization(const MandatoryInfo &info) = 0;
56  virtual icl8u *targetFor(const std::string &featureName, int bytes) = 0;
57  };
59  virtual MandatoryInfo getDeserializationInfo() = 0;
60  virtual std::vector<std::string> getFeatures() = 0;
61  virtual const icl8u *sourceFor(const std::string &featureName, int &bytes) = 0;
62  };
63 
66  virtual void initializeSerialization(const MandatoryInfo &info);
67  virtual icl8u *targetFor(const std::string &featureName, int bytes);
68 
71 
73  std::map<std::string, std::vector<icl8u> > data;
74 
76  int getFullSerializationSize() const;
77 
79  void copyData(icl8u *dst);
80 
81  void clear();
82  };
83 
86  std::map<std::string, std::vector<icl8u> > data;
87  std::vector<std::string> features;
88 
90 
91  virtual MandatoryInfo getDeserializationInfo() { return info; }
92  virtual std::vector<std::string> getFeatures() { return features; }
93 
94  virtual const icl8u *sourceFor(const std::string &featureName, int &bytes);
95  };
96 
97  static void serialize(const PointCloudObjectBase &o, SerializationDevice &d);
98 
99  static void deserialize(PointCloudObjectBase &o, DeserializationDevice &d);
100  };
101 
102  }
103 }
undocument this line if you encounter any issues!
Definition: Any.h:37
Ipp8u icl8u
8Bit unsigned integer type for the ICL
Definition: BasicTypes.h:64
Utility class used as intermediate layer for point cloud serialization.
Definition: PointCloudSerializer.h:43
Base class for point cloud data types.
Definition: PointCloudObjectBase.h:98
icl64s timestamp
Definition: PointCloudSerializer.h:50
#define ICLGeom_API
Definition: CompatMacros.h:179
std::map< std::string, std::vector< icl8u > > data
interall collected data
Definition: PointCloudSerializer.h:73
int width
Definition: PointCloudSerializer.h:47
MandatoryInfo info
saved info
Definition: PointCloudSerializer.h:70
Mandatory information provided by each point cloud.
Definition: PointCloudSerializer.h:46
int64_t icl64s
64bit signed integer type for the ICL
Definition: BasicTypes.h:94
ICLQt_API ImgROI data(ImgQ &r)
creates full ROI ROI-struct
virtual std::vector< std::string > getFeatures()
Definition: PointCloudSerializer.h:92
std::map< std::string, std::vector< icl8u > > data
Definition: PointCloudSerializer.h:86
bool organized
Definition: PointCloudSerializer.h:49
int height
Definition: PointCloudSerializer.h:48
MandatoryInfo info
Definition: PointCloudSerializer.h:85
Utilitty class used for.
Definition: PointCloudSerializer.h:65
std::vector< std::string > features
Definition: PointCloudSerializer.h:87
virtual MandatoryInfo getDeserializationInfo()
Definition: PointCloudSerializer.h:91
Definition: PointCloudSerializer.h:58
Definition: PointCloudSerializer.h:54