graph.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <VirtualRobot/VirtualRobot.h>
4 
5 #include <VisionX/interface/libraries/SemanticObjectRelations/Graph.h>
6 
7 #include <SemanticObjectRelations/RelationGraph/json/AttributedGraph.h>
8 
9 namespace armarx::semantic
10 {
11 
12  data::Graph toIce(const semrel::AttributedGraph& input);
13  semrel::AttributedGraph fromIce(const semantic::data::Graph& graph);
14 
15  template <typename VA, typename EA, typename GA>
18  {
19  return toIce(semrel::toAttributedGraph(graph));
20  }
21 
22  template <typename VA, typename EA, typename GA>
24  toIce(const semrel::RelationGraph<VA, EA, GA>& graph, const semrel::ShapeMap& objects)
25  {
26  return toIce(semrel::toAttributedGraph(graph, objects));
27  }
28 
29  template <typename GraphT>
30  GraphT
32  {
33  return fromIce(graph).toGraph<GraphT>();
34  }
35 
36 } // namespace armarx::semantic
semrel::RelationGraph
Definition: forward_declarations.h:27
armarx::semantic::toIce
data::Graph toIce(const semrel::AttributedGraph &input)
Definition: graph.cpp:15
armarx::aron::input
ReaderT::InputType & input
Definition: rw.h:12
armarx::Graph
boost::subgraph< CloudGraph > Graph
Definition: Common.h:58
armarx::semantic
Definition: ShapesSupportRelations.cpp:32
armarx::semantic::fromIce
semrel::AttributedGraph fromIce(const semantic::data::Graph &graph)
Definition: graph.h:31