1 #ifndef CURFIL_IMPORT_HPP
2 #define CURFIL_IMPORT_HPP
4 #include <boost/date_time/posix_time/posix_time.hpp>
5 #include <boost/filesystem.hpp>
6 #include <boost/property_tree/ptree.hpp>
9 #include "random_forest_image.h"
28 std::string& hostname,
29 boost::filesystem::path& folderTraining,
30 boost::posix_time::ptime& date);
34 static XY readXY(
const boost::property_tree::ptree& pt);
38 static boost::shared_ptr<RandomTree<PixelInstance, ImageFeatureFunction> > readTree(
39 const boost::property_tree::ptree& pt,
44 static std::vector<T> fromPropertyTree(
const boost::optional<boost::property_tree::ptree&>& propertyTree,
45 const std::vector<T> defaultValue = std::vector<T>()) {
47 std::vector<T> values = defaultValue;
50 boost::property_tree::ptree::const_iterator it;
51 for (it = propertyTree.get().begin(); it != propertyTree.get().end(); it++) {
52 values.push_back(it->second.get_value<T>());
60 const boost::property_tree::ptree& p);