ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ClassMap.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <map>
11 #include <string>
12 #include <vector>
13 
14 namespace ClassMap {
15 static std::map<size_t, std::string> SemanticMap = {{0, "Unlabeled"},
16  {1, "Manmade-Terrain"},
17  {2, "Natural-Terrain"},
18  {3, "High-Vegetation"},
19  {4, "Low-Vegetation"},
20  {5, "Buildings"},
21  {6, "Hard-Scape"},
22  {7, "Scanning-Artifacts"},
23  {8, "Cars"},
24  {9, "Utility-Pole"},
25  {10, "Insulator"},
26  {11, "Electrical-Wire"},
27  {12, "Cross-Bar"},
28  {13, "Stick"},
29  {14, "Fuse"},
30  {15, "Wire-clip"},
31  {16, "Linker-insulator"},
32  {17, "Persons"},
33  {18, "Traffic-Sign"},
34  {19, "Traffic-Light"}};
35 
36 static int FindindexByValue(const std::string& value) {
37  std::map<size_t, std::string>::const_iterator it = SemanticMap.begin();
38  for (; it != SemanticMap.end(); ++it) {
39  if (it->second == value) {
40  return static_cast<int>(it->first);
41  }
42  }
43 
44  return -1;
45 }
46 
47 typedef std::map<std::string, std::vector<size_t>> ClusterMap;
48 } // namespace ClassMap
std::map< std::string, std::vector< size_t > > ClusterMap
Definition: ClassMap.h:47
static std::map< size_t, std::string > SemanticMap
Definition: ClassMap.h:15
static int FindindexByValue(const std::string &value)
Definition: ClassMap.h:36