g2o
Public Member Functions | Public Attributes | List of all members
g2o::GuiHyperGraphAction Class Reference

action which calls an GUI update after each iteration More...

#include <gui_hyper_graph_action.h>

Inheritance diagram for g2o::GuiHyperGraphAction:
Inheritance graph
[legend]
Collaboration diagram for g2o::GuiHyperGraphAction:
Collaboration graph
[legend]

Public Member Functions

 GuiHyperGraphAction ()
 
 ~GuiHyperGraphAction ()
 
HyperGraphActionoperator() (const HyperGraph *graph, Parameters *parameters=0)
 
- Public Member Functions inherited from g2o::HyperGraphAction
virtual ~HyperGraphAction ()
 

Public Attributes

G2oQGLViewerviewer
 the viewer which visualizes the graph More...
 
bool dumpScreenshots
 

Detailed Description

action which calls an GUI update after each iteration

Definition at line 32 of file gui_hyper_graph_action.h.

Constructor & Destructor Documentation

g2o::GuiHyperGraphAction::GuiHyperGraphAction ( )

Definition at line 27 of file gui_hyper_graph_action.cpp.

27  :
28  HyperGraphAction(),
29  viewer(0), dumpScreenshots(false)
30 {
31 }
G2oQGLViewer * viewer
the viewer which visualizes the graph
g2o::GuiHyperGraphAction::~GuiHyperGraphAction ( )

Definition at line 33 of file gui_hyper_graph_action.cpp.

34 {
35 }

Member Function Documentation

HyperGraphAction * g2o::GuiHyperGraphAction::operator() ( const HyperGraph graph,
Parameters parameters = 0 
)
virtual

calling updateGL, processEvents to visualize the current state after each iteration

Reimplemented from g2o::HyperGraphAction.

Definition at line 37 of file gui_hyper_graph_action.cpp.

References dumpScreenshots, g2o::HyperGraphAction::ParametersIteration::iteration, g2o::G2oQGLViewer::setUpdateDisplay(), and viewer.

38 {
39  (void) graph;
40  if (viewer) {
41  viewer->setUpdateDisplay(true);
42  viewer->updateGL();
43 
44  if (dumpScreenshots) {
45  ParametersIteration* p = dynamic_cast<ParametersIteration*>(parameters);
46  if (p) {
47  viewer->setSnapshotFormat(QString("PNG"));
48  viewer->setSnapshotQuality(-1);
49  viewer->saveSnapshot(QString().sprintf("g2o%.6d.png", p->iteration), true);
50  }
51  }
52 
53  qApp->processEvents();
54  return this;
55  }
56  return 0;
57 }
void setUpdateDisplay(bool updateDisplay)
G2oQGLViewer * viewer
the viewer which visualizes the graph
Protocol The SLAM executable accepts such as solving the and retrieving or vertices in the graph
Definition: protocol.txt:7

Member Data Documentation

bool g2o::GuiHyperGraphAction::dumpScreenshots

Definition at line 44 of file gui_hyper_graph_action.h.

Referenced by operator()(), and g2o::RunG2OViewer::run().

G2oQGLViewer* g2o::GuiHyperGraphAction::viewer

the viewer which visualizes the graph

Definition at line 43 of file gui_hyper_graph_action.h.

Referenced by operator()(), and g2o::RunG2OViewer::run().


The documentation for this class was generated from the following files: