1 #ifndef OPENPOSE_FILESTREAM_W_HEAT_MAP_SAVER_HPP
2 #define OPENPOSE_FILESTREAM_W_HEAT_MAP_SAVER_HPP
10 template<
typename TDatums>
14 explicit WHeatMapSaver(
const std::shared_ptr<HeatMapSaver>& heatMapSaver);
21 const std::shared_ptr<HeatMapSaver> spHeatMapSaver;
35 template<
typename TDatums>
37 spHeatMapSaver{heatMapSaver}
41 template<
typename TDatums>
46 template<
typename TDatums>
58 auto& tDatumsNoPtr = *tDatums;
60 std::vector<Array<float>> poseHeatMaps(tDatumsNoPtr.size());
61 for (
auto i = 0u; i < tDatumsNoPtr.size(); i++)
62 poseHeatMaps[i] = tDatumsNoPtr[i].poseHeatMaps;
63 const auto fileName = (!tDatumsNoPtr[0].name.empty()
64 ? tDatumsNoPtr[0].name : std::to_string(tDatumsNoPtr[0].
id)) +
"_pose_heatmaps";
65 spHeatMapSaver->saveHeatMaps(poseHeatMaps, fileName);
69 __LINE__, __FUNCTION__, __FILE__);
74 catch (
const std::exception& e)
77 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
84 #endif // OPENPOSE_FILESTREAM_W_HEAT_MAP_SAVER_HPP
Definition: workerConsumer.hpp:10
void initializationOnThread()
Definition: wHeatMapSaver.hpp:42
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:53
bool checkNoNullNorEmpty(const TPointerContainer &tPointerContainer)
Definition: pointerContainer.hpp:7
WHeatMapSaver(const std::shared_ptr< HeatMapSaver > &heatMapSaver)
Definition: wHeatMapSaver.hpp:36
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)
Definition: wHeatMapSaver.hpp:11
void workConsumer(const TDatums &tDatums)
Definition: wHeatMapSaver.hpp:47
COMPILE_TEMPLATE_DATUM(WPoseTriangulation)
static void timerEnd(const std::string &key)