Ocean
tracking/mapbuilding/Utilities.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_TRACKING_MAPBUILDING_UTILITIES_H
9 #define META_OCEAN_TRACKING_MAPBUILDING_UTILITIES_H
10 
14 
15 #include "ocean/io/Bitstream.h"
16 
17 namespace Ocean
18 {
19 
20 namespace Tracking
21 {
22 
23 namespace MapBuilding
24 {
25 
26 /**
27  * This class implements utility functions.
28  * @ingroup trackingmapbuilding
29  */
30 class OCEAN_TRACKING_MAPBUILDING_EXPORT Utilities : public DescriptorHandling
31 {
32  public:
33 
34  /**
35  * Writes a descriptor map to an output stream.
36  * @param unifiedDescriptorMap The descriptor map to write
37  * @param outputStream The output stream to which the map will be written
38  * @return True, if succeeded
39  */
40  static bool writeDescriptorMap(const UnifiedDescriptorMap& unifiedDescriptorMap, IO::OutputBitstream& outputStream);
41 
42  /**
43  * Reads a descriptor map from an output stream.
44  * @param inputStream The stream from which the map will be read
45  * @param unifiedDescriptorMap The resulting descriptor map
46  * @return True, if succeeded
47  */
48  static bool readDescriptorMap(IO::InputBitstream& inputStream, std::shared_ptr<UnifiedDescriptorMap>& unifiedDescriptorMap);
49 };
50 
51 }
52 
53 }
54 
55 }
56 
57 #endif // META_OCEAN_TRACKING_MAPBUILDING_UTILITIES_H
This class implements an input bitstream.
Definition: Bitstream.h:51
This class implements an output bitstream.
Definition: Bitstream.h:168
This class implements functions necessary when handling descriptors.
Definition: DescriptorHandling.h:32
This class implements the base class for all unified descriptor maps in which ids are mapped to descr...
Definition: UnifiedDescriptorMap.h:38
This class implements utility functions.
Definition: tracking/mapbuilding/Utilities.h:31
static bool readDescriptorMap(IO::InputBitstream &inputStream, std::shared_ptr< UnifiedDescriptorMap > &unifiedDescriptorMap)
Reads a descriptor map from an output stream.
static bool writeDescriptorMap(const UnifiedDescriptorMap &unifiedDescriptorMap, IO::OutputBitstream &outputStream)
Writes a descriptor map to an output stream.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15