Go to the documentation of this file.
21 #include "boost/filesystem.hpp"
25 namespace fs = boost::filesystem;
29 std::vector< fs::path >
30 get_files(fs::path
const &root, std::string
const &ext)
32 std::vector< fs::path > paths;
34 if(fs::exists(root) && fs::is_directory(root))
36 for(
auto const &entry : fs::recursive_directory_iterator(root))
38 if(fs::is_regular_file(entry) && entry.path().extension() == ext)
39 paths.emplace_back(entry.path().filename());
48 template<
typename HalfedgeGraph,
71 size_t nbf = files.size();
72 std::vector< double > _distortion_per_batch(nbf, 0.);
73 for(
size_t i = 0; i < nbf; i++)
75 HalfedgeGraph current_mesh;
80 auto current_pm =
get(boost::vertex_point, current_mesh);
93 _distortion_per_batch[i] =
97 std::ofstream dist_file;
98 dist_file.open(root.string() +
"dist_measures" +
".csv");
99 auto it_dist = _distortion_per_batch.begin();
100 dist_file <<
"DISTORSION"
102 for( ; it_dist != _distortion_per_batch.end(); it_dist++)
104 dist_file << (*it_dist) <<
"\n";
Preprocessing class is dedicated to provide a list of preprocessings that are needed to guarantee tha...
Geometric_metrics is a class dedicated to the geometric distance computation between an original full...
std::map< std::string, boost::any > PMapsContainer
void process_mesh_before_quantization()
Suppress all small connected components (isolated vertices and isolated edges). To apply before quant...
std::vector< fs::path > get_files(fs::path const &root, std::string const &ext)
double compute_symmetric_L2(const HalfedgeGraph &LoD, bool compute_RMSE_instead_of_max)
Proposed RMSE and Hausdorff distances implementation.
void read_mesh(const std::string &filename, FEVV::CGALPointSet &g, PMapsContainer &pmaps, bool=false)
Load mesh from file.
boost::property_map< FEVV::DataStructures::AIF::AIFMesh, boost::vertex_index_t >::const_type get(const boost::vertex_index_t &, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the vertex index property map of the mesh.
void compute_distortions(HalfedgeGraph &g, PointMap &pm, fs::path const &root)