1 #ifndef OPENPOSE_GUI_W_GUI_HPP
2 #define OPENPOSE_GUI_W_GUI_HPP
11 template<
typename TDatums>
15 explicit WGui(
const std::shared_ptr<Gui>& gui);
22 std::shared_ptr<Gui> spGui;
36 template<
typename TDatums>
42 template<
typename TDatums>
47 spGui->initializationOnThread();
49 catch (
const std::exception& e)
51 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
55 template<
typename TDatums>
60 if (tDatums !=
nullptr)
63 if (tDatums->size() > 1)
64 error(
"Only implemented for tDatums->size() == 1", __LINE__, __FUNCTION__, __FILE__);
70 auto& tDatumsNoPtr = *tDatums;
72 const auto cvOutputData = (!tDatumsNoPtr.empty() ? tDatumsNoPtr[0].cvOutputData : cv::Mat());
73 spGui->update(cvOutputData);
75 if (!tDatumsNoPtr.empty())
84 catch (
const std::exception& e)
87 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
94 #endif // OPENPOSE_GUI_W_GUI_HPP
Definition: workerConsumer.hpp:10
void workConsumer(const TDatums &tDatums)
Definition: wGui.hpp:56
void initializationOnThread()
Definition: wGui.hpp:43
static const unsigned long long DEFAULT_X
Definition: profiler.hpp:24
static const std::string timerInit(const int line, const std::string &function, const std::string &file)
OP_API void error(const std::string &message, const int line=-1, const std::string &function="", const std::string &file="")
void dLog(const T &message, const Priority priority=Priority::Max, const int line=-1, const std::string &function="", const std::string &file="")
Definition: errorAndLog.hpp:47
COMPILE_TEMPLATE_DATUM(WCvMatToOpInput)
static void printAveragedTimeMsOnIterationX(const std::string &key, const int line, const std::string &function, const std::string &file, const unsigned long long x=DEFAULT_X)
WGui(const std::shared_ptr< Gui > &gui)
Definition: wGui.hpp:37
static void timerEnd(const std::string &key)